You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+67-32
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,6 @@
9
9
10
10
java client, based on jclouds, to interact with Bitbucket's REST API.
11
11
12
-
13
12
## On jclouds, apis and endpoints
14
13
Being built on top of `jclouds` means things are broken up into [Apis](https://github.com/cdancy/bitbucket-rest/tree/master/src/main/java/com/cdancy/bitbucket/rest/features).
15
14
`Apis` are just Interfaces that are analagous to a resource provided by the server-side program (e.g. /api/branches, /api/pullrequest, /api/commits, etc..).
@@ -44,68 +43,104 @@ Can be sourced from jcenter like so:
44
43
45
44
javadocs can be found via [github pages here](http://cdancy.github.io/bitbucket-rest/docs/javadoc/)
46
45
47
-
## Property based setup
46
+
## Examples on how to build a _BitbucketClient_
47
+
48
+
When using `Basic` (e.g. username and password) authentication:
.endPoint("http://127.0.0.1:7990") // Optional and can be sourced from system/env. Falls back to http://127.0.0.1:7990
105
133
.build();
106
134
107
135
Version version = client.api().systemApi().version();
108
136
137
+
It should be noted that when using this feature a merge happens behind the scenes between all
138
+
possible ways one can pass in _overrides_. Meaning if you pass in a `Properties` object, and
139
+
there are `System Properties` and `Environment Variables` set, then all 3 will be merged into
140
+
a single `Properties` object which in turn will be passed along to _jclouds_. When it comes to
141
+
precedence passed in `Properties` take precedence over `System Properties` which in turn
142
+
take precedence over `Environment Variables`.
143
+
109
144
## Understanding Error objects
110
145
111
146
When something pops server-side `bitbucket` will hand us back a list of [Error](https://github.com/cdancy/bitbucket-rest/blob/master/src/main/java/com/cdancy/bitbucket/rest/error/Error.java) objects. Instead of failing and/or throwing an exception at runtime we attach this List of `Error` objects
0 commit comments