basecamp3 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +21 -0
- data/README.md +65 -0
- data/Rakefile +6 -0
- data/basecamp3.gemspec +38 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/docs/Basecamp3.html +367 -0
- data/docs/Basecamp3/Campfire.html +901 -0
- data/docs/Basecamp3/CampfireLine.html +1025 -0
- data/docs/Basecamp3/Comment.html +1284 -0
- data/docs/Basecamp3/Concerns.html +117 -0
- data/docs/Basecamp3/Concerns/Bucketable.html +211 -0
- data/docs/Basecamp3/Concerns/Commentable.html +285 -0
- data/docs/Basecamp3/Concerns/Creatorable.html +209 -0
- data/docs/Basecamp3/Concerns/Parentable.html +211 -0
- data/docs/Basecamp3/Concerns/Recordingable.html +189 -0
- data/docs/Basecamp3/Concerns/Recordingable/ClassMethods.html +236 -0
- data/docs/Basecamp3/Document.html +1262 -0
- data/docs/Basecamp3/Forward.html +1070 -0
- data/docs/Basecamp3/Inbox.html +840 -0
- data/docs/Basecamp3/Message.html +1262 -0
- data/docs/Basecamp3/MessageBoard.html +840 -0
- data/docs/Basecamp3/MessageType.html +1160 -0
- data/docs/Basecamp3/Model.html +236 -0
- data/docs/Basecamp3/Person.html +1288 -0
- data/docs/Basecamp3/Project.html +1280 -0
- data/docs/Basecamp3/Question.html +1050 -0
- data/docs/Basecamp3/QuestionAnswer.html +887 -0
- data/docs/Basecamp3/Questionnaire.html +840 -0
- data/docs/Basecamp3/Request.html +933 -0
- data/docs/Basecamp3/ResponseParser.html +303 -0
- data/docs/Basecamp3/Schedule.html +840 -0
- data/docs/Basecamp3/ScheduleEntry.html +1560 -0
- data/docs/Basecamp3/Todo.html +1726 -0
- data/docs/Basecamp3/TodoList.html +1480 -0
- data/docs/Basecamp3/TodoSet.html +980 -0
- data/docs/Basecamp3/TypeMapper.html +329 -0
- data/docs/Basecamp3/Vault.html +1514 -0
- data/docs/_index.html +415 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +492 -0
- data/docs/file.README.html +157 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +157 -0
- data/docs/js/app.js +248 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +1875 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/basecamp3.rb +61 -0
- data/lib/basecamp3/concerns/bucketable.rb +17 -0
- data/lib/basecamp3/concerns/commentable.rb +15 -0
- data/lib/basecamp3/concerns/creatorable.rb +16 -0
- data/lib/basecamp3/concerns/parentable.rb +17 -0
- data/lib/basecamp3/concerns/recordingable.rb +22 -0
- data/lib/basecamp3/model.rb +23 -0
- data/lib/basecamp3/models/campfire.rb +42 -0
- data/lib/basecamp3/models/campfire_line.rb +52 -0
- data/lib/basecamp3/models/comment.rb +65 -0
- data/lib/basecamp3/models/document.rb +71 -0
- data/lib/basecamp3/models/forward.rb +40 -0
- data/lib/basecamp3/models/inbox.rb +31 -0
- data/lib/basecamp3/models/message.rb +73 -0
- data/lib/basecamp3/models/message_board.rb +31 -0
- data/lib/basecamp3/models/message_type.rb +68 -0
- data/lib/basecamp3/models/person.rb +46 -0
- data/lib/basecamp3/models/project.rb +70 -0
- data/lib/basecamp3/models/question.rb +43 -0
- data/lib/basecamp3/models/question_answer.rb +35 -0
- data/lib/basecamp3/models/questionnaire.rb +31 -0
- data/lib/basecamp3/models/schedule.rb +31 -0
- data/lib/basecamp3/models/schedule_entry.rb +93 -0
- data/lib/basecamp3/models/todo.rb +108 -0
- data/lib/basecamp3/models/todo_list.rb +77 -0
- data/lib/basecamp3/models/todo_set.rb +33 -0
- data/lib/basecamp3/models/vault.rb +79 -0
- data/lib/basecamp3/request.rb +163 -0
- data/lib/basecamp3/response_parser.rb +44 -0
- data/lib/basecamp3/type_mapper.rb +53 -0
- data/lib/basecamp3/version.rb +3 -0
- metadata +202 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 25d907fca510e039fabfd3250013637c7d800246
|
4
|
+
data.tar.gz: c5edc62e7674fc10be160f26464e30d09e7cdedb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d4802fd3ca6ecc7678f94e329cdc399ae67b8c47dcb52dfc1864a86fd6948403cc5a13a3e16f68341d7c2e05e3d0c2a8c23a3bf59ab0044b8ad96c8d6085a757
|
7
|
+
data.tar.gz: 06f465c38773e80de1668006da2a7e36aced8aab17a276a14b6207807f28b116476f2e65010e47b9150aae5969ca84dfb0ecee11eadf44561e44b1a055542f36
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 goth-pl
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
# Basecamp3 API Wrapper
|
2
|
+
|
3
|
+
A simple Ruby Wrapper for the Basecamp3 API.
|
4
|
+
|
5
|
+
[For more information about Basecamp3 API, see the official documentation](https://github.com/basecamp/bc3-api)
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'basecamp3'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install basecamp3
|
22
|
+
|
23
|
+
## Basic usage
|
24
|
+
|
25
|
+
First, you have to establish a connection to Basecamp3. If you don't know how to get the access token, [see the official authentication guide](https://github.com/basecamp/api/blob/master/sections/authentication.md)
|
26
|
+
|
27
|
+
Basecamp3.connect(YOUR_BASECAMP3_ACCOUNT_ID, YOUR_BASECAMP3_ACCESS_TOKEN)
|
28
|
+
|
29
|
+
That's all. You can make requests now.
|
30
|
+
|
31
|
+
E.g.: to get the TODO, just call the `find` method from the `Basecamp3::Todo` class:
|
32
|
+
|
33
|
+
todo = Basecamp3::Todo.find(BUCKET_ID, TODO_ID)
|
34
|
+
todo.content # = 'Hello world!'
|
35
|
+
|
36
|
+
## Documentation
|
37
|
+
|
38
|
+
For the full documentation go [here](https://miastologia.github.io/basecamp3-api-wrapper/).
|
39
|
+
|
40
|
+
## TODO
|
41
|
+
|
42
|
+
### Missing models
|
43
|
+
* Attachments
|
44
|
+
* Chatbots
|
45
|
+
* Client approvals
|
46
|
+
* Client correspondences
|
47
|
+
* Client replies
|
48
|
+
* Events
|
49
|
+
* Recordings
|
50
|
+
* Templates
|
51
|
+
* Uploads
|
52
|
+
* Webhooks
|
53
|
+
|
54
|
+
### Other
|
55
|
+
* updating Basecamp data directly from a model instance (something like `save` method)
|
56
|
+
|
57
|
+
## Contributing
|
58
|
+
|
59
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/miastologia/basecamp3-api-wrapper.
|
60
|
+
|
61
|
+
|
62
|
+
## License
|
63
|
+
|
64
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
65
|
+
|
data/Rakefile
ADDED
data/basecamp3.gemspec
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'basecamp3/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "basecamp3"
|
8
|
+
spec.version = Basecamp3::VERSION
|
9
|
+
spec.authors = ["goth-pl"]
|
10
|
+
spec.email = ["m.szycko@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Basecamp3 API Wrapper}
|
13
|
+
spec.description = %q{A simple Ruby Wrapper for the Basecamp 3 API}
|
14
|
+
spec.homepage = "https://github.com/miastologia/basecamp3-api-wrapper"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
spec.metadata['allowed_push_host'] = "https://rubygems.org"
|
21
|
+
else
|
22
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
23
|
+
"public gem pushes."
|
24
|
+
end
|
25
|
+
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
f.match(%r{^(test|spec|features)/})
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
spec.add_development_dependency "bundler", "~> 1.13"
|
34
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
35
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
36
|
+
spec.add_development_dependency "webmock", "~> 3.0"
|
37
|
+
spec.add_development_dependency "yard", "~> 0.9.9"
|
38
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "basecamp3"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/docs/Basecamp3.html
ADDED
@@ -0,0 +1,367 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: Basecamp3
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.9
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "Basecamp3";
|
19
|
+
relpath = '';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="_index.html">Index (B)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">Basecamp3</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: Basecamp3
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/basecamp3/concerns/bucketable.rb<span class="defines">,<br />
|
82
|
+
lib/basecamp3.rb,<br /> lib/basecamp3/version.rb,<br /> lib/basecamp3/concerns/parentable.rb,<br /> lib/basecamp3/concerns/commentable.rb,<br /> lib/basecamp3/concerns/creatorable.rb,<br /> lib/basecamp3/concerns/recordingable.rb</span>
|
83
|
+
</dd>
|
84
|
+
</dl>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<h2>Overview</h2><div class="docstring">
|
89
|
+
<div class="discussion">
|
90
|
+
|
91
|
+
<p>A concern for recordingable models</p>
|
92
|
+
|
93
|
+
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
<div class="tags">
|
97
|
+
|
98
|
+
|
99
|
+
</div><h2>Defined Under Namespace</h2>
|
100
|
+
<p class="children">
|
101
|
+
|
102
|
+
|
103
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Basecamp3/Concerns.html" title="Basecamp3::Concerns (module)">Concerns</a></span>
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Basecamp3/Campfire.html" title="Basecamp3::Campfire (class)">Campfire</a></span>, <span class='object_link'><a href="Basecamp3/CampfireLine.html" title="Basecamp3::CampfireLine (class)">CampfireLine</a></span>, <span class='object_link'><a href="Basecamp3/Comment.html" title="Basecamp3::Comment (class)">Comment</a></span>, <span class='object_link'><a href="Basecamp3/Document.html" title="Basecamp3::Document (class)">Document</a></span>, <span class='object_link'><a href="Basecamp3/Forward.html" title="Basecamp3::Forward (class)">Forward</a></span>, <span class='object_link'><a href="Basecamp3/Inbox.html" title="Basecamp3::Inbox (class)">Inbox</a></span>, <span class='object_link'><a href="Basecamp3/Message.html" title="Basecamp3::Message (class)">Message</a></span>, <span class='object_link'><a href="Basecamp3/MessageBoard.html" title="Basecamp3::MessageBoard (class)">MessageBoard</a></span>, <span class='object_link'><a href="Basecamp3/MessageType.html" title="Basecamp3::MessageType (class)">MessageType</a></span>, <span class='object_link'><a href="Basecamp3/Model.html" title="Basecamp3::Model (class)">Model</a></span>, <span class='object_link'><a href="Basecamp3/Person.html" title="Basecamp3::Person (class)">Person</a></span>, <span class='object_link'><a href="Basecamp3/Project.html" title="Basecamp3::Project (class)">Project</a></span>, <span class='object_link'><a href="Basecamp3/Question.html" title="Basecamp3::Question (class)">Question</a></span>, <span class='object_link'><a href="Basecamp3/QuestionAnswer.html" title="Basecamp3::QuestionAnswer (class)">QuestionAnswer</a></span>, <span class='object_link'><a href="Basecamp3/Questionnaire.html" title="Basecamp3::Questionnaire (class)">Questionnaire</a></span>, <span class='object_link'><a href="Basecamp3/Request.html" title="Basecamp3::Request (class)">Request</a></span>, <span class='object_link'><a href="Basecamp3/ResponseParser.html" title="Basecamp3::ResponseParser (class)">ResponseParser</a></span>, <span class='object_link'><a href="Basecamp3/Schedule.html" title="Basecamp3::Schedule (class)">Schedule</a></span>, <span class='object_link'><a href="Basecamp3/ScheduleEntry.html" title="Basecamp3::ScheduleEntry (class)">ScheduleEntry</a></span>, <span class='object_link'><a href="Basecamp3/Todo.html" title="Basecamp3::Todo (class)">Todo</a></span>, <span class='object_link'><a href="Basecamp3/TodoList.html" title="Basecamp3::TodoList (class)">TodoList</a></span>, <span class='object_link'><a href="Basecamp3/TodoSet.html" title="Basecamp3::TodoSet (class)">TodoSet</a></span>, <span class='object_link'><a href="Basecamp3/TypeMapper.html" title="Basecamp3::TypeMapper (class)">TypeMapper</a></span>, <span class='object_link'><a href="Basecamp3/Vault.html" title="Basecamp3::Vault (class)">Vault</a></span>
|
108
|
+
|
109
|
+
|
110
|
+
</p>
|
111
|
+
|
112
|
+
<h2>Constant Summary</h2>
|
113
|
+
<dl class="constants">
|
114
|
+
|
115
|
+
<dt id="HOST-constant" class="">HOST =
|
116
|
+
|
117
|
+
</dt>
|
118
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>https://3.basecampapi.com</span><span class='tstring_end'>'</span></span></pre></dd>
|
119
|
+
|
120
|
+
<dt id="VERSION-constant" class="">VERSION =
|
121
|
+
|
122
|
+
</dt>
|
123
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.1.0</span><span class='tstring_end'>"</span></span></pre></dd>
|
124
|
+
|
125
|
+
</dl>
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
<h2>
|
135
|
+
Class Method Summary
|
136
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
137
|
+
</h2>
|
138
|
+
|
139
|
+
<ul class="summary">
|
140
|
+
|
141
|
+
<li class="public ">
|
142
|
+
<span class="summary_signature">
|
143
|
+
|
144
|
+
<a href="#connect-class_method" title="connect (class method)">.<strong>connect</strong>(account_id, access_token) ⇒ Object </a>
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
</span>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
<span class="summary_desc"><div class='inline'>
|
159
|
+
<p>Establishes a connection with basecamp.</p>
|
160
|
+
</div></span>
|
161
|
+
|
162
|
+
</li>
|
163
|
+
|
164
|
+
|
165
|
+
<li class="public ">
|
166
|
+
<span class="summary_signature">
|
167
|
+
|
168
|
+
<a href="#request-class_method" title="request (class method)">.<strong>request</strong> ⇒ Basecamp3::Request </a>
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
</span>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
<span class="summary_desc"><div class='inline'>
|
183
|
+
<p>Returns the request object.</p>
|
184
|
+
</div></span>
|
185
|
+
|
186
|
+
</li>
|
187
|
+
|
188
|
+
|
189
|
+
</ul>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
<div id="class_method_details" class="method_details_list">
|
195
|
+
<h2>Class Method Details</h2>
|
196
|
+
|
197
|
+
|
198
|
+
<div class="method_details first">
|
199
|
+
<h3 class="signature first" id="connect-class_method">
|
200
|
+
|
201
|
+
.<strong>connect</strong>(account_id, access_token) ⇒ <tt>Object</tt>
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
</h3><div class="docstring">
|
208
|
+
<div class="discussion">
|
209
|
+
|
210
|
+
<p>Establishes a connection with basecamp</p>
|
211
|
+
|
212
|
+
|
213
|
+
</div>
|
214
|
+
</div>
|
215
|
+
<div class="tags">
|
216
|
+
<p class="tag_title">Parameters:</p>
|
217
|
+
<ul class="param">
|
218
|
+
|
219
|
+
<li>
|
220
|
+
|
221
|
+
<span class='name'>account_id</span>
|
222
|
+
|
223
|
+
|
224
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
—
|
229
|
+
<div class='inline'>
|
230
|
+
<p>the id of your basecamp account</p>
|
231
|
+
</div>
|
232
|
+
|
233
|
+
</li>
|
234
|
+
|
235
|
+
<li>
|
236
|
+
|
237
|
+
<span class='name'>access_token</span>
|
238
|
+
|
239
|
+
|
240
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
—
|
245
|
+
<div class='inline'>
|
246
|
+
<p>the oauth2 access token</p>
|
247
|
+
</div>
|
248
|
+
|
249
|
+
</li>
|
250
|
+
|
251
|
+
</ul>
|
252
|
+
|
253
|
+
|
254
|
+
</div><table class="source_code">
|
255
|
+
<tr>
|
256
|
+
<td>
|
257
|
+
<pre class="lines">
|
258
|
+
|
259
|
+
|
260
|
+
45
|
261
|
+
46
|
262
|
+
47
|
263
|
+
48
|
264
|
+
49
|
265
|
+
50
|
266
|
+
51</pre>
|
267
|
+
</td>
|
268
|
+
<td>
|
269
|
+
<pre class="code"><span class="info file"># File 'lib/basecamp3.rb', line 45</span>
|
270
|
+
|
271
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_connect'>connect</span><span class='lparen'>(</span><span class='id identifier rubyid_account_id'>account_id</span><span class='comma'>,</span> <span class='id identifier rubyid_access_token'>access_token</span><span class='rparen'>)</span>
|
272
|
+
<span class='ivar'>@account_id</span> <span class='op'>=</span> <span class='id identifier rubyid_account_id'>account_id</span>
|
273
|
+
<span class='ivar'>@access_token</span> <span class='op'>=</span> <span class='id identifier rubyid_access_token'>access_token</span>
|
274
|
+
<span class='ivar'>@uri</span> <span class='op'>=</span> <span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="#HOST-constant" title="Basecamp3::HOST (constant)">HOST</a></span></span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='ivar'>@account_id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
275
|
+
|
276
|
+
<span class='ivar'>@request</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="Basecamp3 (module)">Basecamp3</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Basecamp3/Request.html" title="Basecamp3::Request (class)">Request</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Basecamp3/Request.html#initialize-instance_method" title="Basecamp3::Request#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@access_token</span><span class='comma'>,</span> <span class='ivar'>@uri</span><span class='rparen'>)</span>
|
277
|
+
<span class='kw'>end</span></pre>
|
278
|
+
</td>
|
279
|
+
</tr>
|
280
|
+
</table>
|
281
|
+
</div>
|
282
|
+
|
283
|
+
<div class="method_details ">
|
284
|
+
<h3 class="signature " id="request-class_method">
|
285
|
+
|
286
|
+
.<strong>request</strong> ⇒ <tt><span class='object_link'><a href="Basecamp3/Request.html" title="Basecamp3::Request (class)">Basecamp3::Request</a></span></tt>
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
</h3><div class="docstring">
|
293
|
+
<div class="discussion">
|
294
|
+
|
295
|
+
<p>Returns the request object</p>
|
296
|
+
|
297
|
+
|
298
|
+
</div>
|
299
|
+
</div>
|
300
|
+
<div class="tags">
|
301
|
+
|
302
|
+
<p class="tag_title">Returns:</p>
|
303
|
+
<ul class="return">
|
304
|
+
|
305
|
+
<li>
|
306
|
+
|
307
|
+
|
308
|
+
<span class='type'>(<tt><span class='object_link'><a href="Basecamp3/Request.html" title="Basecamp3::Request (class)">Basecamp3::Request</a></span></tt>)</span>
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
</li>
|
313
|
+
|
314
|
+
</ul>
|
315
|
+
<p class="tag_title">Raises:</p>
|
316
|
+
<ul class="raise">
|
317
|
+
|
318
|
+
<li>
|
319
|
+
|
320
|
+
|
321
|
+
<span class='type'>(<tt>StandardError</tt>)</span>
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
—
|
326
|
+
<div class='inline'>
|
327
|
+
<p>raises an error if a connection is not established</p>
|
328
|
+
</div>
|
329
|
+
|
330
|
+
</li>
|
331
|
+
|
332
|
+
</ul>
|
333
|
+
|
334
|
+
</div><table class="source_code">
|
335
|
+
<tr>
|
336
|
+
<td>
|
337
|
+
<pre class="lines">
|
338
|
+
|
339
|
+
|
340
|
+
57
|
341
|
+
58
|
342
|
+
59</pre>
|
343
|
+
</td>
|
344
|
+
<td>
|
345
|
+
<pre class="code"><span class="info file"># File 'lib/basecamp3.rb', line 57</span>
|
346
|
+
|
347
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_request'>request</span>
|
348
|
+
<span class='ivar'>@request</span> <span class='op'>||</span> <span class='id identifier rubyid_raise'>raise</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>You have to call Basecamp.connect method first</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
349
|
+
<span class='kw'>end</span></pre>
|
350
|
+
</td>
|
351
|
+
</tr>
|
352
|
+
</table>
|
353
|
+
</div>
|
354
|
+
|
355
|
+
</div>
|
356
|
+
|
357
|
+
</div>
|
358
|
+
|
359
|
+
<div id="footer">
|
360
|
+
Generated on Tue May 9 15:32:16 2017 by
|
361
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
362
|
+
0.9.9 (ruby-2.2.2).
|
363
|
+
</div>
|
364
|
+
|
365
|
+
</div>
|
366
|
+
</body>
|
367
|
+
</html>
|