bcx 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +0 -2
- data/README.md +8 -9
- data/Rakefile +2 -0
- data/bcx.gemspec +1 -1
- data/docs/configuration.html +0 -35
- data/docs/response_error.html +0 -35
- data/docs/version.html +1 -36
- data/lib/bcx/client/http.rb +1 -1
- data/lib/bcx/client/oauth.rb +1 -1
- data/lib/bcx/resources/person.rb +2 -1
- data/lib/bcx/resources/project.rb +34 -34
- data/lib/bcx/resources/todo.rb +31 -31
- data/lib/bcx/resources/todolist.rb +44 -44
- data/lib/bcx/version.rb +1 -1
- data/lib/bcx.rb +2 -1
- data/lib/rapidash/collection.rb +33 -0
- data/lib/tasks/docs.rake +41 -0
- metadata +18 -27
- data/docs/bcx.html +0 -171
- data/docs/http.html +0 -125
- data/docs/oauth.html +0 -127
- data/docs/person.html +0 -125
- data/docs/project.html +0 -143
- data/docs/public/fonts/fleurons.eot +0 -0
- data/docs/public/fonts/fleurons.ttf +0 -0
- data/docs/public/fonts/fleurons.woff +0 -0
- data/docs/public/images/gray.png +0 -0
- data/docs/todo.html +0 -138
- data/docs/todolist.html +0 -148
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bcx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rapidash
|
16
|
-
requirement: &
|
16
|
+
requirement: &70300257229040 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - =
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.3.0.beta
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70300257229040
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70300257228480 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70300257228480
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70300257227940 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70300257227940
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: simplecov
|
49
|
-
requirement: &
|
49
|
+
requirement: &70300257227420 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70300257227420
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: vcr
|
60
|
-
requirement: &
|
60
|
+
requirement: &70300257226900 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70300257226900
|
69
69
|
description: Fully-fledged Ruby API wrapper for Basecamp Next
|
70
70
|
email:
|
71
71
|
- paul@springett.me
|
@@ -81,30 +81,19 @@ files:
|
|
81
81
|
- README.md
|
82
82
|
- Rakefile
|
83
83
|
- bcx.gemspec
|
84
|
-
- docs/bcx.html
|
85
84
|
- docs/configuration.html
|
86
85
|
- docs/docco.css
|
87
|
-
- docs/http.html
|
88
|
-
- docs/oauth.html
|
89
|
-
- docs/person.html
|
90
|
-
- docs/project.html
|
91
86
|
- docs/public/fonts/aller-bold.eot
|
92
87
|
- docs/public/fonts/aller-bold.ttf
|
93
88
|
- docs/public/fonts/aller-bold.woff
|
94
89
|
- docs/public/fonts/aller-light.eot
|
95
90
|
- docs/public/fonts/aller-light.ttf
|
96
91
|
- docs/public/fonts/aller-light.woff
|
97
|
-
- docs/public/fonts/fleurons.eot
|
98
|
-
- docs/public/fonts/fleurons.ttf
|
99
|
-
- docs/public/fonts/fleurons.woff
|
100
92
|
- docs/public/fonts/novecento-bold.eot
|
101
93
|
- docs/public/fonts/novecento-bold.ttf
|
102
94
|
- docs/public/fonts/novecento-bold.woff
|
103
|
-
- docs/public/images/gray.png
|
104
95
|
- docs/public/stylesheets/normalize.css
|
105
96
|
- docs/response_error.html
|
106
|
-
- docs/todo.html
|
107
|
-
- docs/todolist.html
|
108
97
|
- docs/version.html
|
109
98
|
- lib/bcx.rb
|
110
99
|
- lib/bcx/client/http.rb
|
@@ -116,6 +105,8 @@ files:
|
|
116
105
|
- lib/bcx/resources/todolist.rb
|
117
106
|
- lib/bcx/response_error.rb
|
118
107
|
- lib/bcx/version.rb
|
108
|
+
- lib/rapidash/collection.rb
|
109
|
+
- lib/tasks/docs.rake
|
119
110
|
- spec/bcx/client_spec.rb
|
120
111
|
- spec/bcx/person_spec.rb
|
121
112
|
- spec/bcx/project_spec.rb
|
@@ -177,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
177
168
|
version: '0'
|
178
169
|
segments:
|
179
170
|
- 0
|
180
|
-
hash:
|
171
|
+
hash: -811180034632004614
|
181
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
173
|
none: false
|
183
174
|
requirements:
|
@@ -186,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
177
|
version: '0'
|
187
178
|
segments:
|
188
179
|
- 0
|
189
|
-
hash:
|
180
|
+
hash: -811180034632004614
|
190
181
|
requirements: []
|
191
182
|
rubyforge_project:
|
192
183
|
rubygems_version: 1.8.16
|
data/docs/bcx.html
DELETED
@@ -1,171 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<title>bcx.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
|
-
bcx.rb
|
24
|
-
</a>
|
25
|
-
|
26
|
-
|
27
|
-
<a class="source" href="http.html">
|
28
|
-
http.rb
|
29
|
-
</a>
|
30
|
-
|
31
|
-
|
32
|
-
<a class="source" href="oauth.html">
|
33
|
-
oauth.rb
|
34
|
-
</a>
|
35
|
-
|
36
|
-
|
37
|
-
<a class="source" href="configuration.html">
|
38
|
-
configuration.rb
|
39
|
-
</a>
|
40
|
-
|
41
|
-
|
42
|
-
<a class="source" href="person.html">
|
43
|
-
person.rb
|
44
|
-
</a>
|
45
|
-
|
46
|
-
|
47
|
-
<a class="source" href="project.html">
|
48
|
-
project.rb
|
49
|
-
</a>
|
50
|
-
|
51
|
-
|
52
|
-
<a class="source" href="todo.html">
|
53
|
-
todo.rb
|
54
|
-
</a>
|
55
|
-
|
56
|
-
|
57
|
-
<a class="source" href="todolist.html">
|
58
|
-
todolist.rb
|
59
|
-
</a>
|
60
|
-
|
61
|
-
|
62
|
-
<a class="source" href="response_error.html">
|
63
|
-
response_error.rb
|
64
|
-
</a>
|
65
|
-
|
66
|
-
|
67
|
-
<a class="source" href="version.html">
|
68
|
-
version.rb
|
69
|
-
</a>
|
70
|
-
|
71
|
-
</div>
|
72
|
-
</li>
|
73
|
-
</ul>
|
74
|
-
|
75
|
-
<ul class="sections">
|
76
|
-
|
77
|
-
<li id="title">
|
78
|
-
<div class="annotation">
|
79
|
-
<h1>bcx.rb</h1>
|
80
|
-
</div>
|
81
|
-
</li>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
<li id="section-1">
|
86
|
-
<div class="annotation">
|
87
|
-
|
88
|
-
<div class="pilwrap ">
|
89
|
-
<a class="pilcrow" href="#section-1">¶</a>
|
90
|
-
</div>
|
91
|
-
|
92
|
-
</div>
|
93
|
-
|
94
|
-
<div class="content"><div class='highlight'><pre><span class="keyword">require</span> <span class="string">'rapidash'</span>
|
95
|
-
<span class="keyword">require</span> <span class="string">'bcx/version'</span></pre></div></div>
|
96
|
-
|
97
|
-
</li>
|
98
|
-
|
99
|
-
|
100
|
-
<li id="section-2">
|
101
|
-
<div class="annotation">
|
102
|
-
|
103
|
-
<div class="pilwrap for-h1">
|
104
|
-
<a class="pilcrow" href="#section-2">¶</a>
|
105
|
-
</div>
|
106
|
-
<h1>Bcx</h1>
|
107
|
-
<p>Fully-fledged Ruby API wrapper for Basecamp Next</p>
|
108
|
-
<p> See the <a href="https://github.com/paulspringett/bcx#readme">README</a> for usage</p>
|
109
|
-
|
110
|
-
</div>
|
111
|
-
|
112
|
-
<div class="content"><div class='highlight'><pre><span class="class"><span class="keyword">module</span> <span class="title">Bcx</span></span>
|
113
|
-
autoload <span class="symbol">:Configuration</span>, <span class="string">'bcx/configuration'</span>
|
114
|
-
|
115
|
-
<span class="class"><span class="keyword">module</span> <span class="title">Resources</span></span>
|
116
|
-
autoload <span class="symbol">:Todo</span>, <span class="string">'bcx/resources/todo'</span>
|
117
|
-
autoload <span class="symbol">:Todolist</span>, <span class="string">'bcx/resources/todolist'</span>
|
118
|
-
autoload <span class="symbol">:Project</span>, <span class="string">'bcx/resources/project'</span>
|
119
|
-
autoload <span class="symbol">:Person</span>, <span class="string">'bcx/resources/person'</span>
|
120
|
-
<span class="keyword">end</span>
|
121
|
-
|
122
|
-
<span class="class"><span class="keyword">module</span> <span class="title">Client</span></span>
|
123
|
-
autoload <span class="symbol">:HTTP</span>, <span class="string">'bcx/client/http'</span>
|
124
|
-
autoload <span class="symbol">:OAuth</span>, <span class="string">'bcx/client/oauth'</span>
|
125
|
-
<span class="keyword">end</span>
|
126
|
-
|
127
|
-
<span class="class"><span class="keyword">class</span> <span class="inheritance"><</span><span class="inheritance">< <span class="parent">self</span></span></span>
|
128
|
-
attr_accessor <span class="symbol">:configuration</span>
|
129
|
-
<span class="keyword">end</span></pre></div></div>
|
130
|
-
|
131
|
-
</li>
|
132
|
-
|
133
|
-
|
134
|
-
<li id="section-3">
|
135
|
-
<div class="annotation">
|
136
|
-
|
137
|
-
<div class="pilwrap ">
|
138
|
-
<a class="pilcrow" href="#section-3">¶</a>
|
139
|
-
</div>
|
140
|
-
<p>Expose configuration block</p>
|
141
|
-
|
142
|
-
</div>
|
143
|
-
|
144
|
-
<div class="content"><div class='highlight'><pre> <span class="function"><span class="keyword">def</span> <span class="title"><span class="keyword">self</span></span>.<span class="title">configure</span></span>
|
145
|
-
<span class="keyword">self</span>.configuration ||= <span class="constant">Configuration</span>.new
|
146
|
-
<span class="keyword">yield</span>(configuration)
|
147
|
-
<span class="keyword">end</span>
|
148
|
-
<span class="keyword">end</span></pre></div></div>
|
149
|
-
|
150
|
-
</li>
|
151
|
-
|
152
|
-
|
153
|
-
<li id="section-4">
|
154
|
-
<div class="annotation">
|
155
|
-
|
156
|
-
<div class="pilwrap ">
|
157
|
-
<a class="pilcrow" href="#section-4">¶</a>
|
158
|
-
</div>
|
159
|
-
<p>Use custom <code>Bcx::ResponseError</code> on top of Rapidash's error handling</p>
|
160
|
-
|
161
|
-
</div>
|
162
|
-
|
163
|
-
<div class="content"><div class='highlight'><pre><span class="keyword">require</span> <span class="string">'bcx/response_error'</span>
|
164
|
-
<span class="constant">Rapidash</span>.response_exception_class = <span class="constant">Bcx::ResponseError</span></pre></div></div>
|
165
|
-
|
166
|
-
</li>
|
167
|
-
|
168
|
-
</ul>
|
169
|
-
</div>
|
170
|
-
</body>
|
171
|
-
</html>
|
data/docs/http.html
DELETED
@@ -1,125 +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
|
-
bcx.rb
|
24
|
-
</a>
|
25
|
-
|
26
|
-
|
27
|
-
<a class="source" href="http.html">
|
28
|
-
http.rb
|
29
|
-
</a>
|
30
|
-
|
31
|
-
|
32
|
-
<a class="source" href="oauth.html">
|
33
|
-
oauth.rb
|
34
|
-
</a>
|
35
|
-
|
36
|
-
|
37
|
-
<a class="source" href="configuration.html">
|
38
|
-
configuration.rb
|
39
|
-
</a>
|
40
|
-
|
41
|
-
|
42
|
-
<a class="source" href="person.html">
|
43
|
-
person.rb
|
44
|
-
</a>
|
45
|
-
|
46
|
-
|
47
|
-
<a class="source" href="project.html">
|
48
|
-
project.rb
|
49
|
-
</a>
|
50
|
-
|
51
|
-
|
52
|
-
<a class="source" href="todo.html">
|
53
|
-
todo.rb
|
54
|
-
</a>
|
55
|
-
|
56
|
-
|
57
|
-
<a class="source" href="todolist.html">
|
58
|
-
todolist.rb
|
59
|
-
</a>
|
60
|
-
|
61
|
-
|
62
|
-
<a class="source" href="response_error.html">
|
63
|
-
response_error.rb
|
64
|
-
</a>
|
65
|
-
|
66
|
-
|
67
|
-
<a class="source" href="version.html">
|
68
|
-
version.rb
|
69
|
-
</a>
|
70
|
-
|
71
|
-
</div>
|
72
|
-
</li>
|
73
|
-
</ul>
|
74
|
-
|
75
|
-
<ul class="sections">
|
76
|
-
|
77
|
-
<li id="title">
|
78
|
-
<div class="annotation">
|
79
|
-
<h1>http.rb</h1>
|
80
|
-
</div>
|
81
|
-
</li>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
<li id="section-1">
|
86
|
-
<div class="annotation">
|
87
|
-
|
88
|
-
<div class="pilwrap ">
|
89
|
-
<a class="pilcrow" href="#section-1">¶</a>
|
90
|
-
</div>
|
91
|
-
|
92
|
-
</div>
|
93
|
-
|
94
|
-
<div class="content"><div class='highlight'><pre><span class="class"><span class="keyword">module</span> <span class="title">Bcx</span></span>
|
95
|
-
<span class="class"><span class="keyword">module</span> <span class="title">Client</span></span>
|
96
|
-
<span class="class"><span class="keyword">class</span> <span class="title">HTTP</span> <span class="inheritance">< <span class="parent">Rapidash::Client</span></span></span>
|
97
|
-
method <span class="symbol">:http</span>
|
98
|
-
|
99
|
-
extension <span class="symbol">:json</span>
|
100
|
-
encode_post_data_with <span class="symbol">:json</span>
|
101
|
-
|
102
|
-
raise_errors
|
103
|
-
|
104
|
-
resource <span class="symbol">:projects</span>, <span class="symbol">class_name:</span> <span class="string">'Bcx::Resources::Project'</span>
|
105
|
-
resource <span class="symbol">:todolists</span>, <span class="symbol">class_name:</span> <span class="string">'Bcx::Resources::Todolist'</span>
|
106
|
-
resource <span class="symbol">:people</span>, <span class="symbol">class_name:</span> <span class="string">'Bcx::Resources::Person'</span>
|
107
|
-
|
108
|
-
<span class="function"><span class="keyword">def</span> <span class="title">initialize</span><span class="params">(options = {})</span></span>
|
109
|
-
<span class="variable">@account</span> = <span class="constant">Bcx</span>.configuration.account
|
110
|
-
<span class="variable">@api_version</span> = <span class="constant">Bcx</span>.configuration.api_version
|
111
|
-
|
112
|
-
<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>)
|
113
|
-
|
114
|
-
<span class="keyword">super</span>(options)
|
115
|
-
<span class="keyword">end</span>
|
116
|
-
<span class="keyword">end</span>
|
117
|
-
<span class="keyword">end</span>
|
118
|
-
<span class="keyword">end</span></pre></div></div>
|
119
|
-
|
120
|
-
</li>
|
121
|
-
|
122
|
-
</ul>
|
123
|
-
</div>
|
124
|
-
</body>
|
125
|
-
</html>
|
data/docs/oauth.html
DELETED
@@ -1,127 +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
|
-
bcx.rb
|
24
|
-
</a>
|
25
|
-
|
26
|
-
|
27
|
-
<a class="source" href="http.html">
|
28
|
-
http.rb
|
29
|
-
</a>
|
30
|
-
|
31
|
-
|
32
|
-
<a class="source" href="oauth.html">
|
33
|
-
oauth.rb
|
34
|
-
</a>
|
35
|
-
|
36
|
-
|
37
|
-
<a class="source" href="configuration.html">
|
38
|
-
configuration.rb
|
39
|
-
</a>
|
40
|
-
|
41
|
-
|
42
|
-
<a class="source" href="person.html">
|
43
|
-
person.rb
|
44
|
-
</a>
|
45
|
-
|
46
|
-
|
47
|
-
<a class="source" href="project.html">
|
48
|
-
project.rb
|
49
|
-
</a>
|
50
|
-
|
51
|
-
|
52
|
-
<a class="source" href="todo.html">
|
53
|
-
todo.rb
|
54
|
-
</a>
|
55
|
-
|
56
|
-
|
57
|
-
<a class="source" href="todolist.html">
|
58
|
-
todolist.rb
|
59
|
-
</a>
|
60
|
-
|
61
|
-
|
62
|
-
<a class="source" href="response_error.html">
|
63
|
-
response_error.rb
|
64
|
-
</a>
|
65
|
-
|
66
|
-
|
67
|
-
<a class="source" href="version.html">
|
68
|
-
version.rb
|
69
|
-
</a>
|
70
|
-
|
71
|
-
</div>
|
72
|
-
</li>
|
73
|
-
</ul>
|
74
|
-
|
75
|
-
<ul class="sections">
|
76
|
-
|
77
|
-
<li id="title">
|
78
|
-
<div class="annotation">
|
79
|
-
<h1>oauth.rb</h1>
|
80
|
-
</div>
|
81
|
-
</li>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
<li id="section-1">
|
86
|
-
<div class="annotation">
|
87
|
-
|
88
|
-
<div class="pilwrap ">
|
89
|
-
<a class="pilcrow" href="#section-1">¶</a>
|
90
|
-
</div>
|
91
|
-
|
92
|
-
</div>
|
93
|
-
|
94
|
-
<div class="content"><div class='highlight'><pre><span class="class"><span class="keyword">module</span> <span class="title">Bcx</span></span>
|
95
|
-
<span class="class"><span class="keyword">module</span> <span class="title">Client</span></span>
|
96
|
-
<span class="class"><span class="keyword">class</span> <span class="title">OAuth</span> <span class="inheritance">< <span class="parent">Rapidash::Client</span></span></span>
|
97
|
-
method <span class="symbol">:oauth</span>
|
98
|
-
|
99
|
-
extension <span class="symbol">:json</span>
|
100
|
-
encode_post_data_with <span class="symbol">:json</span>
|
101
|
-
|
102
|
-
raise_errors
|
103
|
-
|
104
|
-
resource <span class="symbol">:projects</span>, <span class="symbol">class_name:</span> <span class="string">'Bcx::Resources::Project'</span>
|
105
|
-
resource <span class="symbol">:todolists</span>, <span class="symbol">class_name:</span> <span class="string">'Bcx::Resources::Todolist'</span>
|
106
|
-
resource <span class="symbol">:people</span>, <span class="symbol">class_name:</span> <span class="string">'Bcx::Resources::Person'</span>
|
107
|
-
|
108
|
-
<span class="function"><span class="keyword">def</span> <span class="title">initialize</span><span class="params">(options = {})</span></span>
|
109
|
-
<span class="variable">@account</span> = <span class="constant">Bcx</span>.configuration.account
|
110
|
-
<span class="variable">@api_version</span> = <span class="constant">Bcx</span>.configuration.api_version
|
111
|
-
|
112
|
-
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>
|
113
|
-
options[<span class="symbol">:uid</span>] ||= options[<span class="symbol">:client_id</span>]
|
114
|
-
options[<span class="symbol">:secret</span>] ||= options[<span class="symbol">:client_secret</span>]
|
115
|
-
|
116
|
-
<span class="keyword">super</span>(options)
|
117
|
-
<span class="keyword">end</span>
|
118
|
-
<span class="keyword">end</span>
|
119
|
-
<span class="keyword">end</span>
|
120
|
-
<span class="keyword">end</span></pre></div></div>
|
121
|
-
|
122
|
-
</li>
|
123
|
-
|
124
|
-
</ul>
|
125
|
-
</div>
|
126
|
-
</body>
|
127
|
-
</html>
|