Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
f1f5863b
Commit
f1f5863b
authored
Aug 22, 2016
by
Douglas Barbosa Alexandre
Committed by
Stan Hu
Nov 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an endpoint to get the Bitbucket user profile
parent
fc34c956
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
lib/bitbucket/client.rb
lib/bitbucket/client.rb
+5
-0
lib/bitbucket/representation/base.rb
lib/bitbucket/representation/base.rb
+13
-0
lib/bitbucket/representation/user.rb
lib/bitbucket/representation/user.rb
+9
-0
No files found.
lib/bitbucket/client.rb
View file @
f1f5863b
...
...
@@ -4,6 +4,11 @@ module Bitbucket
@connection
=
options
.
fetch
(
:connection
,
Connection
.
new
(
options
))
end
def
user
parsed_response
=
connection
.
get
(
'/user'
)
Representation
::
User
.
new
(
parsed_response
)
end
private
attr_reader
:connection
...
...
lib/bitbucket/representation/base.rb
0 → 100644
View file @
f1f5863b
module
Bitbucket
module
Representation
class
Base
def
initialize
(
raw
)
@raw
=
raw
end
private
attr_reader
:raw
end
end
end
lib/bitbucket/representation/user.rb
0 → 100644
View file @
f1f5863b
module
Bitbucket
module
Representation
class
User
<
Representation
::
Base
def
username
raw
[
'username'
]
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment