bcx 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/.travis.yml +2 -0
- data/README.md +1 -1
- data/bcx.gemspec +2 -1
- data/docs/access.html +140 -0
- data/docs/authorization.html +147 -0
- data/docs/bcx.html +200 -0
- data/docs/comment.html +139 -0
- data/docs/configuration.html +137 -0
- data/docs/docco.css +76 -64
- data/docs/http.html +151 -0
- data/docs/oauth.html +144 -0
- data/docs/person.html +147 -0
- data/docs/project.html +154 -0
- data/docs/public/fonts/roboto-black.eot +0 -0
- data/docs/public/fonts/roboto-black.ttf +0 -0
- data/docs/public/fonts/roboto-black.woff +0 -0
- data/docs/response_error.html +153 -0
- data/docs/todo.html +148 -0
- data/docs/todolist.html +158 -0
- data/docs/version.html +125 -0
- data/lib/bcx/resources/comment.rb +26 -0
- data/lib/bcx/resources/project.rb +1 -0
- data/lib/bcx/resources/todo.rb +1 -0
- data/lib/bcx/resources/todolist.rb +1 -0
- data/lib/bcx/version.rb +1 -1
- data/lib/bcx.rb +1 -0
- data/lib/tasks/docs.rake +4 -2
- data/spec/bcx/comment_spec.rb +31 -0
- data/spec/cassettes/Bcx_Resources_Comment/DELETE_/projects/9634353/comments/297584179_json/should_delete_the_given_comment.yml +140 -0
- data/spec/cassettes/Bcx_Resources_Comment/POST_/projects/9634353/todolists/29123043/comments_json/should_create_a_new_todolist_comment.yml +114 -0
- data/spec/cassettes/Bcx_Resources_Comment/POST_/projects/9634353/todos/185137845/comments_json/should_create_a_new_todo_comment.yml +114 -0
- metadata +41 -30
- data/docs/lib/bcx/client/http.html +0 -144
- data/docs/lib/bcx/client/oauth.html +0 -146
- data/docs/lib/bcx/configuration.html +0 -80
- data/docs/lib/bcx/launchpad/oauth.html +0 -137
- data/docs/lib/bcx/resources/access.html +0 -133
- data/docs/lib/bcx/resources/authorization.html +0 -140
- data/docs/lib/bcx/resources/person.html +0 -140
- data/docs/lib/bcx/resources/project.html +0 -146
- data/docs/lib/bcx/resources/todo.html +0 -140
- data/docs/lib/bcx/resources/todolist.html +0 -150
- data/docs/lib/bcx/response_error.html +0 -96
- data/docs/lib/bcx/version.html +0 -68
- data/docs/lib/bcx.html +0 -192
- data/docs/public/fonts/novecento-bold.eot +0 -0
- data/docs/public/fonts/novecento-bold.ttf +0 -0
- data/docs/public/fonts/novecento-bold.woff +0 -0
@@ -0,0 +1,114 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://basecamp.com/2274488/api/v1/projects/9634353/todos/185137845/comments.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"content":"New Todo comment"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.9
|
12
|
+
Authorization:
|
13
|
+
- Basic N3IwZ2d6QGdtYWlsLmNabTpCQ1BabGhma3IyNjU=
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 201
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- openresty
|
23
|
+
date:
|
24
|
+
- Tue, 23 Jun 2015 14:38:12 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
connection:
|
28
|
+
- Keep-Alive
|
29
|
+
status:
|
30
|
+
- 201 Created
|
31
|
+
x-frame-options:
|
32
|
+
- SAMEORIGIN
|
33
|
+
x-xss-protection:
|
34
|
+
- 1; mode=block
|
35
|
+
x-content-type-options:
|
36
|
+
- nosniff
|
37
|
+
x-asset-paths:
|
38
|
+
- '{"desktop.js":"desktop-ffff6ab2353adfd35273439e2b190a97.js","desktop.css":"desktop-d7e97abbc9c3540e9ab5d7537c0b4a05.css"}'
|
39
|
+
etag:
|
40
|
+
- '"addf15375d45daec2e5d07cb0e79b1ea"'
|
41
|
+
cache-control:
|
42
|
+
- max-age=0, private, must-revalidate
|
43
|
+
x-request-id:
|
44
|
+
- 25831a68-f0c7-44be-ba66-e574fed1cb33
|
45
|
+
x-runtime:
|
46
|
+
- '0.238668'
|
47
|
+
x-queue-time:
|
48
|
+
- '0.0011718273162841797'
|
49
|
+
timing-allow-origin:
|
50
|
+
- "*"
|
51
|
+
vary:
|
52
|
+
- Accept-Encoding
|
53
|
+
content-length:
|
54
|
+
- '391'
|
55
|
+
body:
|
56
|
+
encoding: ASCII-8BIT
|
57
|
+
string: '{"id":297586609,"content":"New Todo comment","created_at":"2015-06-23T21:38:12.210+07:00","updated_at":"2015-06-23T21:38:12.210+07:00","private":false,"trashed":false,"attachments":[],"creator":{"id":9056757,"name":"Kosta
|
58
|
+
Korenkov","avatar_url":"http://cdn.37img.com/global/8763e3387c99c11693eef859f5e1ebc30010/avatar.gif?r=3","fullsize_avatar_url":"https://cdn.37img.com/global/8763e3387c99c11693eef859f5e1ebc30010/original.gif?r=3"},"topic_url":"https://basecamp.com/2274488/api/v1/projects/9634353/todos/185137845.json","topic_app_url":"https://basecamp.com/2274488/projects/9634353/todos/185137845"}'
|
59
|
+
http_version:
|
60
|
+
recorded_at: Tue, 23 Jun 2015 14:38:12 GMT
|
61
|
+
- request:
|
62
|
+
method: post
|
63
|
+
uri: https://basecamp.com/2274488/api/v1/projects/9634353/todos/185137845/comments.json
|
64
|
+
body:
|
65
|
+
encoding: UTF-8
|
66
|
+
string: '{"content":"New Todo comment"}'
|
67
|
+
headers:
|
68
|
+
User-Agent:
|
69
|
+
- Faraday v0.8.9
|
70
|
+
Authorization:
|
71
|
+
- Basic YmN4LXRlc3QtdXNlcjpzZWNyZXQ=
|
72
|
+
Content-Type:
|
73
|
+
- application/json
|
74
|
+
response:
|
75
|
+
status:
|
76
|
+
code: 404
|
77
|
+
message:
|
78
|
+
headers:
|
79
|
+
server:
|
80
|
+
- openresty
|
81
|
+
date:
|
82
|
+
- Tue, 23 Jun 2015 14:40:26 GMT
|
83
|
+
content-type:
|
84
|
+
- application/json
|
85
|
+
connection:
|
86
|
+
- Keep-Alive
|
87
|
+
status:
|
88
|
+
- 404 Not Found
|
89
|
+
x-frame-options:
|
90
|
+
- SAMEORIGIN
|
91
|
+
x-xss-protection:
|
92
|
+
- 1; mode=block
|
93
|
+
x-content-type-options:
|
94
|
+
- nosniff
|
95
|
+
reason:
|
96
|
+
- Account Inactive
|
97
|
+
cache-control:
|
98
|
+
- no-cache
|
99
|
+
x-request-id:
|
100
|
+
- 7ad69bbf-b260-4a7b-a0df-d21ad2e2414c
|
101
|
+
x-runtime:
|
102
|
+
- '0.035408'
|
103
|
+
x-queue-time:
|
104
|
+
- '0.0004937648773193359'
|
105
|
+
vary:
|
106
|
+
- Accept-Encoding
|
107
|
+
content-length:
|
108
|
+
- '23'
|
109
|
+
body:
|
110
|
+
encoding: ASCII-8BIT
|
111
|
+
string: ''
|
112
|
+
http_version:
|
113
|
+
recorded_at: Tue, 23 Jun 2015 14:40:26 GMT
|
114
|
+
recorded_with: VCR 2.9.3
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bcx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Springett
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rapidash
|
@@ -28,56 +28,56 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: simplecov
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: vcr
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
description: Fully-fledged Ruby API wrapper for Basecamp Next
|
@@ -95,30 +95,30 @@ files:
|
|
95
95
|
- README.md
|
96
96
|
- Rakefile
|
97
97
|
- bcx.gemspec
|
98
|
+
- docs/access.html
|
99
|
+
- docs/authorization.html
|
100
|
+
- docs/bcx.html
|
101
|
+
- docs/comment.html
|
102
|
+
- docs/configuration.html
|
98
103
|
- docs/docco.css
|
99
|
-
- docs/
|
100
|
-
- docs/
|
101
|
-
- docs/
|
102
|
-
- docs/
|
103
|
-
- docs/lib/bcx/launchpad/oauth.html
|
104
|
-
- docs/lib/bcx/resources/access.html
|
105
|
-
- docs/lib/bcx/resources/authorization.html
|
106
|
-
- docs/lib/bcx/resources/person.html
|
107
|
-
- docs/lib/bcx/resources/project.html
|
108
|
-
- docs/lib/bcx/resources/todo.html
|
109
|
-
- docs/lib/bcx/resources/todolist.html
|
110
|
-
- docs/lib/bcx/response_error.html
|
111
|
-
- docs/lib/bcx/version.html
|
104
|
+
- docs/http.html
|
105
|
+
- docs/oauth.html
|
106
|
+
- docs/person.html
|
107
|
+
- docs/project.html
|
112
108
|
- docs/public/fonts/aller-bold.eot
|
113
109
|
- docs/public/fonts/aller-bold.ttf
|
114
110
|
- docs/public/fonts/aller-bold.woff
|
115
111
|
- docs/public/fonts/aller-light.eot
|
116
112
|
- docs/public/fonts/aller-light.ttf
|
117
113
|
- docs/public/fonts/aller-light.woff
|
118
|
-
- docs/public/fonts/
|
119
|
-
- docs/public/fonts/
|
120
|
-
- docs/public/fonts/
|
114
|
+
- docs/public/fonts/roboto-black.eot
|
115
|
+
- docs/public/fonts/roboto-black.ttf
|
116
|
+
- docs/public/fonts/roboto-black.woff
|
121
117
|
- docs/public/stylesheets/normalize.css
|
118
|
+
- docs/response_error.html
|
119
|
+
- docs/todo.html
|
120
|
+
- docs/todolist.html
|
121
|
+
- docs/version.html
|
122
122
|
- lib/bcx.rb
|
123
123
|
- lib/bcx/client/http.rb
|
124
124
|
- lib/bcx/client/oauth.rb
|
@@ -126,6 +126,7 @@ files:
|
|
126
126
|
- lib/bcx/launchpad/oauth.rb
|
127
127
|
- lib/bcx/resources/access.rb
|
128
128
|
- lib/bcx/resources/authorization.rb
|
129
|
+
- lib/bcx/resources/comment.rb
|
129
130
|
- lib/bcx/resources/person.rb
|
130
131
|
- lib/bcx/resources/project.rb
|
131
132
|
- lib/bcx/resources/todo.rb
|
@@ -136,6 +137,7 @@ files:
|
|
136
137
|
- spec/bcx/access_spec.rb
|
137
138
|
- spec/bcx/authorization_spec.rb
|
138
139
|
- spec/bcx/client_spec.rb
|
140
|
+
- spec/bcx/comment_spec.rb
|
139
141
|
- spec/bcx/launchpad_spec.rb
|
140
142
|
- spec/bcx/person_spec.rb
|
141
143
|
- spec/bcx/project_spec.rb
|
@@ -147,6 +149,9 @@ files:
|
|
147
149
|
- spec/cassettes/Bcx_Resources_Access/GET_/projects/2951531/accesses_json/should_be_an_array.yml
|
148
150
|
- spec/cassettes/Bcx_Resources_Access/POST_/projects/2951531/accesses_json/should_grant_access.yml
|
149
151
|
- spec/cassettes/Bcx_Resources_Authorization/GET_/authorization/first_account_should_have_the_correct_id.yml
|
152
|
+
- spec/cassettes/Bcx_Resources_Comment/DELETE_/projects/9634353/comments/297584179_json/should_delete_the_given_comment.yml
|
153
|
+
- spec/cassettes/Bcx_Resources_Comment/POST_/projects/9634353/todolists/29123043/comments_json/should_create_a_new_todolist_comment.yml
|
154
|
+
- spec/cassettes/Bcx_Resources_Comment/POST_/projects/9634353/todos/185137845/comments_json/should_create_a_new_todo_comment.yml
|
150
155
|
- spec/cassettes/Bcx_Resources_Person/DELETE_/people/4904728_json/should_delete_a_todolist.yml
|
151
156
|
- spec/cassettes/Bcx_Resources_Person/GET_/people/4666033_json/should_have_the_correct_id.yml
|
152
157
|
- spec/cassettes/Bcx_Resources_Person/GET_/people/4666033_json/should_return_a_hash.yml
|
@@ -189,7 +194,8 @@ files:
|
|
189
194
|
- spec/cassettes/Bcx_Resources_Todolist/projects/123/todolists_json/should_create_a_new_todolist.yml
|
190
195
|
- spec/spec_helper.rb
|
191
196
|
homepage: ''
|
192
|
-
licenses:
|
197
|
+
licenses:
|
198
|
+
- MIT
|
193
199
|
metadata: {}
|
194
200
|
post_install_message:
|
195
201
|
rdoc_options: []
|
@@ -197,17 +203,17 @@ require_paths:
|
|
197
203
|
- lib
|
198
204
|
required_ruby_version: !ruby/object:Gem::Requirement
|
199
205
|
requirements:
|
200
|
-
- -
|
206
|
+
- - '>='
|
201
207
|
- !ruby/object:Gem::Version
|
202
208
|
version: '0'
|
203
209
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
210
|
requirements:
|
205
|
-
- -
|
211
|
+
- - '>='
|
206
212
|
- !ruby/object:Gem::Version
|
207
213
|
version: '0'
|
208
214
|
requirements: []
|
209
215
|
rubyforge_project:
|
210
|
-
rubygems_version: 2.
|
216
|
+
rubygems_version: 2.4.7
|
211
217
|
signing_key:
|
212
218
|
specification_version: 4
|
213
219
|
summary: Fully-fledged Ruby API wrapper for Basecamp Next. Uses the Rapidash gem under
|
@@ -216,6 +222,7 @@ test_files:
|
|
216
222
|
- spec/bcx/access_spec.rb
|
217
223
|
- spec/bcx/authorization_spec.rb
|
218
224
|
- spec/bcx/client_spec.rb
|
225
|
+
- spec/bcx/comment_spec.rb
|
219
226
|
- spec/bcx/launchpad_spec.rb
|
220
227
|
- spec/bcx/person_spec.rb
|
221
228
|
- spec/bcx/project_spec.rb
|
@@ -227,6 +234,9 @@ test_files:
|
|
227
234
|
- spec/cassettes/Bcx_Resources_Access/GET_/projects/2951531/accesses_json/should_be_an_array.yml
|
228
235
|
- spec/cassettes/Bcx_Resources_Access/POST_/projects/2951531/accesses_json/should_grant_access.yml
|
229
236
|
- spec/cassettes/Bcx_Resources_Authorization/GET_/authorization/first_account_should_have_the_correct_id.yml
|
237
|
+
- spec/cassettes/Bcx_Resources_Comment/DELETE_/projects/9634353/comments/297584179_json/should_delete_the_given_comment.yml
|
238
|
+
- spec/cassettes/Bcx_Resources_Comment/POST_/projects/9634353/todolists/29123043/comments_json/should_create_a_new_todolist_comment.yml
|
239
|
+
- spec/cassettes/Bcx_Resources_Comment/POST_/projects/9634353/todos/185137845/comments_json/should_create_a_new_todo_comment.yml
|
230
240
|
- spec/cassettes/Bcx_Resources_Person/DELETE_/people/4904728_json/should_delete_a_todolist.yml
|
231
241
|
- spec/cassettes/Bcx_Resources_Person/GET_/people/4666033_json/should_have_the_correct_id.yml
|
232
242
|
- spec/cassettes/Bcx_Resources_Person/GET_/people/4666033_json/should_return_a_hash.yml
|
@@ -268,3 +278,4 @@ test_files:
|
|
268
278
|
- spec/cassettes/Bcx_Resources_Todolist/PUT_/projects/2956584/todolists/8268819_json/should_create_a_new_todolist.yml
|
269
279
|
- spec/cassettes/Bcx_Resources_Todolist/projects/123/todolists_json/should_create_a_new_todolist.yml
|
270
280
|
- spec/spec_helper.rb
|
281
|
+
has_rdoc:
|
@@ -1,144 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<title>http.rb</title>
|
6
|
-
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
7
|
-
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
|
8
|
-
<link rel="stylesheet" media="all" href="../../../docco.css" />
|
9
|
-
</head>
|
10
|
-
<body>
|
11
|
-
<div id="container">
|
12
|
-
<div id="background"></div>
|
13
|
-
|
14
|
-
<ul id="jump_to">
|
15
|
-
<li>
|
16
|
-
<a class="large" href="javascript:void(0);">Jump To …</a>
|
17
|
-
<a class="small" href="javascript:void(0);">+</a>
|
18
|
-
<div id="jump_wrapper">
|
19
|
-
<div id="jump_page">
|
20
|
-
|
21
|
-
|
22
|
-
<a class="source" href="../../bcx.html">
|
23
|
-
lib/bcx.rb
|
24
|
-
</a>
|
25
|
-
|
26
|
-
|
27
|
-
<a class="source" href="http.html">
|
28
|
-
lib/bcx/client/http.rb
|
29
|
-
</a>
|
30
|
-
|
31
|
-
|
32
|
-
<a class="source" href="oauth.html">
|
33
|
-
lib/bcx/client/oauth.rb
|
34
|
-
</a>
|
35
|
-
|
36
|
-
|
37
|
-
<a class="source" href="../configuration.html">
|
38
|
-
lib/bcx/configuration.rb
|
39
|
-
</a>
|
40
|
-
|
41
|
-
|
42
|
-
<a class="source" href="../launchpad/oauth.html">
|
43
|
-
lib/bcx/launchpad/oauth.rb
|
44
|
-
</a>
|
45
|
-
|
46
|
-
|
47
|
-
<a class="source" href="../resources/access.html">
|
48
|
-
lib/bcx/resources/access.rb
|
49
|
-
</a>
|
50
|
-
|
51
|
-
|
52
|
-
<a class="source" href="../resources/authorization.html">
|
53
|
-
lib/bcx/resources/authorization.rb
|
54
|
-
</a>
|
55
|
-
|
56
|
-
|
57
|
-
<a class="source" href="../resources/person.html">
|
58
|
-
lib/bcx/resources/person.rb
|
59
|
-
</a>
|
60
|
-
|
61
|
-
|
62
|
-
<a class="source" href="../resources/project.html">
|
63
|
-
lib/bcx/resources/project.rb
|
64
|
-
</a>
|
65
|
-
|
66
|
-
|
67
|
-
<a class="source" href="../resources/todo.html">
|
68
|
-
lib/bcx/resources/todo.rb
|
69
|
-
</a>
|
70
|
-
|
71
|
-
|
72
|
-
<a class="source" href="../resources/todolist.html">
|
73
|
-
lib/bcx/resources/todolist.rb
|
74
|
-
</a>
|
75
|
-
|
76
|
-
|
77
|
-
<a class="source" href="../response_error.html">
|
78
|
-
lib/bcx/response_error.rb
|
79
|
-
</a>
|
80
|
-
|
81
|
-
|
82
|
-
<a class="source" href="../version.html">
|
83
|
-
lib/bcx/version.rb
|
84
|
-
</a>
|
85
|
-
|
86
|
-
</div>
|
87
|
-
</li>
|
88
|
-
</ul>
|
89
|
-
|
90
|
-
<ul class="sections">
|
91
|
-
|
92
|
-
<li id="title">
|
93
|
-
<div class="annotation">
|
94
|
-
<h1>http.rb</h1>
|
95
|
-
</div>
|
96
|
-
</li>
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
<li id="section-1">
|
101
|
-
<div class="annotation">
|
102
|
-
|
103
|
-
<div class="pilwrap for-h2">
|
104
|
-
<a class="pilcrow" href="#section-1">¶</a>
|
105
|
-
</div>
|
106
|
-
<h2>HTTP Client</h2>
|
107
|
-
<p>Provides a client to access the Basecamp Next API using HTTP authentication</p>
|
108
|
-
<p>Example:</p>
|
109
|
-
<pre><code>client = <span class="constant">Bcx::Client::HTTP</span>.new(<span class="symbol">login:</span> <span class="string">'username'</span>, <span class="symbol">password:</span> <span class="string">'secret'</span>)</code></pre>
|
110
|
-
|
111
|
-
</div>
|
112
|
-
|
113
|
-
<div class="content"><div class='highlight'><pre><span class="class"><span class="keyword">module</span> <span class="title">Bcx</span></span>
|
114
|
-
<span class="class"><span class="keyword">module</span> <span class="title">Client</span></span>
|
115
|
-
<span class="class"><span class="keyword">class</span> <span class="title">HTTP</span> <span class="inheritance">< <span class="parent">Rapidash::Client</span></span></span>
|
116
|
-
method <span class="symbol">:http</span>
|
117
|
-
|
118
|
-
extension <span class="symbol">:json</span>
|
119
|
-
encode_request_with <span class="symbol">:json</span>
|
120
|
-
|
121
|
-
raise_errors
|
122
|
-
|
123
|
-
resource <span class="symbol">:projects</span>, <span class="symbol">class_name:</span> <span class="string">'Bcx::Resources::Project'</span>
|
124
|
-
resource <span class="symbol">:todolists</span>, <span class="symbol">class_name:</span> <span class="string">'Bcx::Resources::Todolist'</span>
|
125
|
-
resource <span class="symbol">:people</span>, <span class="symbol">class_name:</span> <span class="string">'Bcx::Resources::Person'</span>
|
126
|
-
|
127
|
-
<span class="function"><span class="keyword">def</span> <span class="title">initialize</span><span class="params">(options = {})</span></span>
|
128
|
-
<span class="variable">@account</span> = <span class="constant">Bcx</span>.configuration.account
|
129
|
-
<span class="variable">@api_version</span> = <span class="constant">Bcx</span>.configuration.api_version
|
130
|
-
|
131
|
-
<span class="keyword">self</span>.<span class="keyword">class</span>.site(<span class="string">"https://basecamp.com/<span class="subst">#{<span class="variable">@account</span>}</span>/api/<span class="subst">#{<span class="variable">@api_version</span>}</span>/"</span>)
|
132
|
-
|
133
|
-
<span class="keyword">super</span>(options)
|
134
|
-
<span class="keyword">end</span>
|
135
|
-
<span class="keyword">end</span>
|
136
|
-
<span class="keyword">end</span>
|
137
|
-
<span class="keyword">end</span></pre></div></div>
|
138
|
-
|
139
|
-
</li>
|
140
|
-
|
141
|
-
</ul>
|
142
|
-
</div>
|
143
|
-
</body>
|
144
|
-
</html>
|
@@ -1,146 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<title>oauth.rb</title>
|
6
|
-
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
7
|
-
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
|
8
|
-
<link rel="stylesheet" media="all" href="../../../docco.css" />
|
9
|
-
</head>
|
10
|
-
<body>
|
11
|
-
<div id="container">
|
12
|
-
<div id="background"></div>
|
13
|
-
|
14
|
-
<ul id="jump_to">
|
15
|
-
<li>
|
16
|
-
<a class="large" href="javascript:void(0);">Jump To …</a>
|
17
|
-
<a class="small" href="javascript:void(0);">+</a>
|
18
|
-
<div id="jump_wrapper">
|
19
|
-
<div id="jump_page">
|
20
|
-
|
21
|
-
|
22
|
-
<a class="source" href="../../bcx.html">
|
23
|
-
lib/bcx.rb
|
24
|
-
</a>
|
25
|
-
|
26
|
-
|
27
|
-
<a class="source" href="http.html">
|
28
|
-
lib/bcx/client/http.rb
|
29
|
-
</a>
|
30
|
-
|
31
|
-
|
32
|
-
<a class="source" href="oauth.html">
|
33
|
-
lib/bcx/client/oauth.rb
|
34
|
-
</a>
|
35
|
-
|
36
|
-
|
37
|
-
<a class="source" href="../configuration.html">
|
38
|
-
lib/bcx/configuration.rb
|
39
|
-
</a>
|
40
|
-
|
41
|
-
|
42
|
-
<a class="source" href="../launchpad/oauth.html">
|
43
|
-
lib/bcx/launchpad/oauth.rb
|
44
|
-
</a>
|
45
|
-
|
46
|
-
|
47
|
-
<a class="source" href="../resources/access.html">
|
48
|
-
lib/bcx/resources/access.rb
|
49
|
-
</a>
|
50
|
-
|
51
|
-
|
52
|
-
<a class="source" href="../resources/authorization.html">
|
53
|
-
lib/bcx/resources/authorization.rb
|
54
|
-
</a>
|
55
|
-
|
56
|
-
|
57
|
-
<a class="source" href="../resources/person.html">
|
58
|
-
lib/bcx/resources/person.rb
|
59
|
-
</a>
|
60
|
-
|
61
|
-
|
62
|
-
<a class="source" href="../resources/project.html">
|
63
|
-
lib/bcx/resources/project.rb
|
64
|
-
</a>
|
65
|
-
|
66
|
-
|
67
|
-
<a class="source" href="../resources/todo.html">
|
68
|
-
lib/bcx/resources/todo.rb
|
69
|
-
</a>
|
70
|
-
|
71
|
-
|
72
|
-
<a class="source" href="../resources/todolist.html">
|
73
|
-
lib/bcx/resources/todolist.rb
|
74
|
-
</a>
|
75
|
-
|
76
|
-
|
77
|
-
<a class="source" href="../response_error.html">
|
78
|
-
lib/bcx/response_error.rb
|
79
|
-
</a>
|
80
|
-
|
81
|
-
|
82
|
-
<a class="source" href="../version.html">
|
83
|
-
lib/bcx/version.rb
|
84
|
-
</a>
|
85
|
-
|
86
|
-
</div>
|
87
|
-
</li>
|
88
|
-
</ul>
|
89
|
-
|
90
|
-
<ul class="sections">
|
91
|
-
|
92
|
-
<li id="title">
|
93
|
-
<div class="annotation">
|
94
|
-
<h1>oauth.rb</h1>
|
95
|
-
</div>
|
96
|
-
</li>
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
<li id="section-1">
|
101
|
-
<div class="annotation">
|
102
|
-
|
103
|
-
<div class="pilwrap for-h2">
|
104
|
-
<a class="pilcrow" href="#section-1">¶</a>
|
105
|
-
</div>
|
106
|
-
<h2>Oauth Client</h2>
|
107
|
-
<p>Provides a client to access the Basecamp Next API via OAuth credentials</p>
|
108
|
-
<p>Example:</p>
|
109
|
-
<pre><code>client = <span class="constant">Bcx::Client::OAuth</span>.new(<span class="symbol">client_id:</span> <span class="string">'1234567890'</span>, <span class="symbol">client_secret:</span> <span class="string">'831994c4170'</span>, <span class="symbol">access_token:</span> <span class="string">'b02ff9345c3'</span>)</code></pre>
|
110
|
-
|
111
|
-
</div>
|
112
|
-
|
113
|
-
<div class="content"><div class='highlight'><pre><span class="class"><span class="keyword">module</span> <span class="title">Bcx</span></span>
|
114
|
-
<span class="class"><span class="keyword">module</span> <span class="title">Client</span></span>
|
115
|
-
<span class="class"><span class="keyword">class</span> <span class="title">OAuth</span> <span class="inheritance">< <span class="parent">Rapidash::Client</span></span></span>
|
116
|
-
method <span class="symbol">:oauth</span>
|
117
|
-
|
118
|
-
extension <span class="symbol">:json</span>
|
119
|
-
encode_request_with <span class="symbol">:json</span>
|
120
|
-
|
121
|
-
raise_errors
|
122
|
-
|
123
|
-
resource <span class="symbol">:projects</span>, <span class="symbol">class_name:</span> <span class="string">'Bcx::Resources::Project'</span>
|
124
|
-
resource <span class="symbol">:todolists</span>, <span class="symbol">class_name:</span> <span class="string">'Bcx::Resources::Todolist'</span>
|
125
|
-
resource <span class="symbol">:people</span>, <span class="symbol">class_name:</span> <span class="string">'Bcx::Resources::Person'</span>
|
126
|
-
|
127
|
-
<span class="function"><span class="keyword">def</span> <span class="title">initialize</span><span class="params">(options = {})</span></span>
|
128
|
-
<span class="variable">@account</span> = options[<span class="symbol">:account</span>] || <span class="constant">Bcx</span>.configuration.account
|
129
|
-
<span class="variable">@api_version</span> = <span class="constant">Bcx</span>.configuration.api_version
|
130
|
-
|
131
|
-
options[<span class="symbol">:site</span>] = <span class="string">"https://basecamp.com/<span class="subst">#{<span class="variable">@account</span>}</span>/api/<span class="subst">#{<span class="variable">@api_version</span>}</span>"</span>
|
132
|
-
options[<span class="symbol">:uid</span>] ||= options[<span class="symbol">:client_id</span>]
|
133
|
-
options[<span class="symbol">:secret</span>] ||= options[<span class="symbol">:client_secret</span>]
|
134
|
-
|
135
|
-
<span class="keyword">super</span>(options)
|
136
|
-
<span class="keyword">end</span>
|
137
|
-
<span class="keyword">end</span>
|
138
|
-
<span class="keyword">end</span>
|
139
|
-
<span class="keyword">end</span></pre></div></div>
|
140
|
-
|
141
|
-
</li>
|
142
|
-
|
143
|
-
</ul>
|
144
|
-
</div>
|
145
|
-
</body>
|
146
|
-
</html>
|