basecamp_wrapper 0.2.0 → 0.2.1

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/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
- Echoe.new('basecamp_wrapper', '0.2.0') do |p|
4
+ Echoe.new('basecamp_wrapper', '0.2.1') do |p|
5
5
  p.description = "A wrapper for the 37 Signals Basecamp API"
6
6
  p.url = "http://www.github.com/fmiopensource/basecamp_wrapper"
7
7
  p.author = "Chelsea Robb"
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{basecamp_wrapper}
5
- s.version = "0.2.0"
5
+ s.version = "0.2.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Chelsea Robb"]
@@ -356,11 +356,15 @@ class Basecamp
356
356
  end
357
357
  end
358
358
 
359
+
360
+ # To get the current logged in user user
361
+ # Basecamp::People.me
362
+ # To get all by company:
363
+ # Basecamp::Person.find(:all, :params => {:company_id => company.id})
364
+ # To get all by project:
365
+ # Basecamp::Person.find(:all, :params => {:project_id => project.id})
359
366
  class Person < Resource
360
- parent_resources :company
361
- def self.all(company_id)
362
- find(:all, :params => {:company_id => company_id})
363
- end
367
+ parent_resources :company, :projects
364
368
 
365
369
  def self.me
366
370
  get(:me)
@@ -499,23 +503,6 @@ class Basecamp
499
503
  @use_xml = false
500
504
  end
501
505
 
502
- # ==========================================================================
503
- # PEOPLE
504
- # ==========================================================================
505
-
506
- # Return an array of the people in the given company. If the project-id is
507
- # given, only people who have access to the given project will be returned.
508
- def people(company_id, project_id=nil)
509
- url = project_id ? "/projects/#{project_id}" : ""
510
- url << "/contacts/people/#{company_id}"
511
- records "person", url
512
- end
513
-
514
- # Return information about the person with the given id
515
- def person(id)
516
- record "/contacts/person/#{id}"
517
- end
518
-
519
506
  # ==========================================================================
520
507
  # MILESTONES
521
508
  # ==========================================================================
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: basecamp_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chelsea Robb