basecampx 0.0.2 → 0.0.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.
- data/lib/basecampx.rb +1 -0
- data/lib/basecampx/resources/comment.rb +26 -0
- data/lib/basecampx/resources/todo.rb +1 -1
- data/lib/basecampx/version.rb +1 -1
- metadata +3 -2
data/lib/basecampx.rb
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
module Basecampx
|
2
|
+
class Comment < Basecampx::Resource
|
3
|
+
|
4
|
+
attr_accessor :id, :content, :created_at, :updated_at, :attachments, :creator, :topic_url
|
5
|
+
|
6
|
+
def self.find person_id
|
7
|
+
self.new Basecampx.request "people/#{person_id}.json"
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.all
|
11
|
+
self.parse Basecampx.request "people.json"
|
12
|
+
end
|
13
|
+
|
14
|
+
# GET /people/1/assigned_todos.json
|
15
|
+
def todos
|
16
|
+
TodoList.parse Basecampx.request "people/#{self.id}/assigned_todos.json"
|
17
|
+
end
|
18
|
+
|
19
|
+
def details
|
20
|
+
resp = Basecampx.request self.url
|
21
|
+
update_details resp
|
22
|
+
self
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
@@ -2,7 +2,7 @@ module Basecampx
|
|
2
2
|
class Todo < Basecampx::Resource
|
3
3
|
|
4
4
|
attr_accessor :id, :todolist_id, :position, :content, :completed, :due_at, :created_at, :updated_at,
|
5
|
-
:comments_count, :creator, :assignee, :comments, :subscribers
|
5
|
+
:comments_count, :creator, :assignee, :comments, :subscribers, :attachments
|
6
6
|
|
7
7
|
def self.find project_id, todo_id
|
8
8
|
Todo.new Basecampx.request "projects/#{project_id}/todos/#{todo_id}.json"
|
data/lib/basecampx/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: basecampx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-11-
|
13
|
+
date: 2012-11-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|
@@ -60,6 +60,7 @@ files:
|
|
60
60
|
- lib/basecampx.rb
|
61
61
|
- lib/basecampx/base.rb
|
62
62
|
- lib/basecampx/resource.rb
|
63
|
+
- lib/basecampx/resources/comment.rb
|
63
64
|
- lib/basecampx/resources/person.rb
|
64
65
|
- lib/basecampx/resources/project.rb
|
65
66
|
- lib/basecampx/resources/todo.rb
|