angellist_api 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/CHANGELOG.md +15 -0
  2. data/README.md +11 -6
  3. data/Rakefile +9 -0
  4. data/lib/angellist_api.rb +1 -3
  5. data/lib/angellist_api/api.rb +2 -4
  6. data/lib/angellist_api/authentication.rb +0 -1
  7. data/lib/angellist_api/client.rb +9 -1
  8. data/lib/angellist_api/client/activity_feeds.rb +29 -8
  9. data/lib/angellist_api/client/follows.rb +105 -63
  10. data/lib/angellist_api/client/jobs.rb +72 -0
  11. data/lib/angellist_api/client/reviews.rb +17 -6
  12. data/lib/angellist_api/client/search.rb +31 -0
  13. data/lib/angellist_api/client/startup_roles.rb +23 -8
  14. data/lib/angellist_api/client/startups.rb +49 -13
  15. data/lib/angellist_api/client/status_updates.rb +45 -24
  16. data/lib/angellist_api/client/tags.rb +52 -30
  17. data/lib/angellist_api/client/users.rb +39 -17
  18. data/lib/angellist_api/configuration.rb +24 -29
  19. data/lib/angellist_api/connection.rb +27 -29
  20. data/lib/angellist_api/core_ext/hash.rb +19 -0
  21. data/lib/angellist_api/error.rb +9 -32
  22. data/lib/angellist_api/error/bad_gateway.rb +7 -0
  23. data/lib/angellist_api/error/bad_request.rb +7 -0
  24. data/lib/angellist_api/error/enhance_your_calm.rb +13 -0
  25. data/lib/angellist_api/error/forbidden.rb +7 -0
  26. data/lib/angellist_api/error/internal_server_error.rb +7 -0
  27. data/lib/angellist_api/error/not_acceptable.rb +7 -0
  28. data/lib/angellist_api/error/not_found.rb +7 -0
  29. data/lib/angellist_api/error/service_unavailable.rb +7 -0
  30. data/lib/angellist_api/error/unauthorized.rb +7 -0
  31. data/lib/angellist_api/request.rb +11 -18
  32. data/lib/angellist_api/request/angellist_api_oauth.rb +16 -0
  33. data/lib/angellist_api/request/gateway.rb +18 -0
  34. data/lib/angellist_api/request/multipart_with_file.rb +36 -0
  35. data/lib/angellist_api/response/raise_client_error.rb +51 -0
  36. data/lib/angellist_api/response/raise_server_error.rb +27 -0
  37. data/lib/angellist_api/version.rb +1 -1
  38. data/spec/fixtures/cassettes/activity_feeds.yml +273 -0
  39. data/spec/fixtures/cassettes/follows.yml +1722 -0
  40. data/spec/fixtures/cassettes/jobs.yml +2052 -0
  41. data/spec/fixtures/cassettes/reviews.yml +93 -0
  42. data/spec/fixtures/cassettes/search.yml +169 -0
  43. data/spec/fixtures/cassettes/startup_roles.yml +1481 -0
  44. data/spec/fixtures/cassettes/startups.yml +532 -0
  45. data/spec/fixtures/cassettes/status_updates.yml +125 -0
  46. data/spec/fixtures/cassettes/tags.yml +762 -0
  47. data/spec/fixtures/cassettes/users.yml +275 -0
  48. data/spec/integration/activity_feeds_spec.rb +29 -0
  49. data/spec/integration/follows_spec.rb +60 -0
  50. data/spec/integration/jobs_spec.rb +36 -0
  51. data/spec/integration/reviews_spec.rb +15 -0
  52. data/spec/integration/search_spec.rb +27 -0
  53. data/spec/integration/startup_roles_spec.rb +25 -0
  54. data/spec/integration/startups_spec.rb +36 -0
  55. data/spec/integration/status_updates_spec.rb +18 -0
  56. data/spec/integration/tags_spec.rb +29 -0
  57. data/spec/integration/users_spec.rb +23 -0
  58. data/spec/spec_helper.rb +5 -2
  59. data/spec/support/vcr.rb +12 -0
  60. data/spec/{lib → unit/lib}/angellist_api/api_spec.rb +13 -15
  61. data/spec/unit/lib/angellist_api/authentication_spec.rb +49 -0
  62. data/spec/unit/lib/angellist_api/client/activity_feeds_spec.rb +22 -0
  63. data/spec/unit/lib/angellist_api/client/follows_spec.rb +82 -0
  64. data/spec/unit/lib/angellist_api/client/jobs_spec.rb +39 -0
  65. data/spec/unit/lib/angellist_api/client/reviews_spec.rb +14 -0
  66. data/spec/unit/lib/angellist_api/client/search_spec.rb +15 -0
  67. data/spec/unit/lib/angellist_api/client/startup_roles_spec.rb +14 -0
  68. data/spec/unit/lib/angellist_api/client/startups_spec.rb +40 -0
  69. data/spec/unit/lib/angellist_api/client/status_updates_spec.rb +30 -0
  70. data/spec/unit/lib/angellist_api/client/tags_spec.rb +39 -0
  71. data/spec/unit/lib/angellist_api/client/users_spec.rb +39 -0
  72. data/spec/{lib → unit/lib}/angellist_api/configuration_spec.rb +12 -11
  73. data/spec/unit/lib/angellist_api/error_spec.rb +124 -0
  74. data/spec/unit/lib/angellist_api/request_spec.rb +32 -0
  75. data/spec/unit/lib/angellist_api_spec.rb +42 -0
  76. metadata +128 -71
  77. data/lib/faraday/request/angellist_api_oauth.rb +0 -14
  78. data/lib/faraday/request/gateway.rb +0 -18
  79. data/lib/faraday/request/multipart_with_file.rb +0 -36
  80. data/lib/faraday/request/phoenix.rb +0 -18
  81. data/lib/faraday/response/raise_http_4xx.rb +0 -45
  82. data/lib/faraday/response/raise_http_5xx.rb +0 -24
  83. data/spec/lib/angellist_api/authentication_spec.rb +0 -53
  84. data/spec/lib/angellist_api/client/activity_feeds_spec.rb +0 -16
  85. data/spec/lib/angellist_api/client/follows_spec.rb +0 -74
  86. data/spec/lib/angellist_api/client/reviews_spec.rb +0 -16
  87. data/spec/lib/angellist_api/client/startup_roles_spec.rb +0 -16
  88. data/spec/lib/angellist_api/client/startups_spec.rb +0 -23
  89. data/spec/lib/angellist_api/client/status_updates_spec.rb +0 -32
  90. data/spec/lib/angellist_api/client/tags_spec.rb +0 -40
  91. data/spec/lib/angellist_api/client/users_spec.rb +0 -30
  92. data/spec/lib/angellist_api/error_spec.rb +0 -126
  93. data/spec/lib/angellist_api/request_spec.rb +0 -51
  94. data/spec/lib/angellist_api_spec.rb +0 -38
@@ -1,3 +1,18 @@
1
+ ## Master
2
+
3
+ ## 1.0.2 - 30 July, 2012
4
+
5
+ - Loosen dependency requirements for faraday and multi_json, so we don't
6
+ conflict with newer versions of other API gems like Twitter.
7
+ - Added available batch endpoints (users, startups, follows).
8
+ - Added jobs endpoints.
9
+ - Added search endpoint.
10
+ - Filled in a few gaps: startup comments and single activity feed item
11
+ endpoints.
12
+ - Integration specs added using VCR, for unauthenticated calls so far.
13
+ - Backported several changes from Twitter gem which was our genesis.
14
+ - YARD cleanup.
15
+
1
16
  ## 1.0.1 - 22 March, 2012
2
17
 
3
18
  - Doh, we bungled a version number -- no changes.
data/README.md CHANGED
@@ -1,22 +1,27 @@
1
1
  # The AngelList API Ruby Gem
2
2
 
3
- A Ruby wrapper for the [AngelList REST APIs][].
3
+ A Ruby wrapper for the [AngelList REST APIs][]. See the [YARD documentation][].
4
4
 
5
- ## <a name="installation">Installation</a>
5
+ ## Installation
6
6
 
7
7
  gem install angellist_api
8
8
 
9
- ## <a name="pulls">Submitting a Pull Request</a>
9
+ ## Submitting a Pull Request
10
10
 
11
11
  1. Fork the project.
12
12
  2. Create a topic branch.
13
13
  3. Implement your feature or bug fix.
14
14
  4. Add documentation for your feature or bug fix.
15
- 5. Run <tt>bundle exec rake doc:yard</tt>. If your changes are not 100% documented, go back to step 4.
15
+ 5. Run <tt>bundle exec rake doc:yard</tt>. If your changes are not 100%
16
+ documented, go back to step 4.
16
17
  6. Add specs for your feature or bug fix.
17
- 7. Run <tt>bundle exec rake spec</tt>. If your changes are not 100% covered, go back to step 6.
18
+ 7. Run <tt>bundle exec rake spec</tt>. If your changes are not 100% covered, go
19
+ back to step 6.
18
20
  8. Commit and push your changes.
19
- 9. Submit a pull request. Please do not include changes to the gemspec, version, or history file. (If you want to create your own version for some reason, please do so in a separate commit.)
21
+ 9. Submit a pull request. Please do not include changes to the gemspec,
22
+ version, or history file. (If you want to create your own version for some
23
+ reason, please do so in a separate commit.)
20
24
 
21
25
  [AngelList REST APIs]: http://angel.co/api
26
+ [YARD documentation]: http://rdoc.info/gems/angellist_api/frames
22
27
 
data/Rakefile CHANGED
@@ -14,6 +14,15 @@ RSpec::Core::RakeTask.new(:spec)
14
14
  task :test => :spec
15
15
  task :default => :spec
16
16
 
17
+ namespace :spec do
18
+ [:integration, :unit].each do |type|
19
+ desc "Run the code examples in spec/#{type}"
20
+ RSpec::Core::RakeTask.new(type) do |t|
21
+ t.pattern = "./spec/#{type}/**/*_spec.rb"
22
+ end
23
+ end
24
+ end
25
+
17
26
  YARD::Rake::YardocTask.new do |t|
18
27
  t.files = ['lib/**/*.rb', 'README.md']
19
28
  end
@@ -1,7 +1,5 @@
1
- require 'angellist_api/api'
2
1
  require 'angellist_api/client'
3
2
  require 'angellist_api/configuration'
4
- require 'angellist_api/error'
5
3
 
6
4
  module AngellistApi
7
5
  extend Configuration
@@ -23,4 +21,4 @@ module AngellistApi
23
21
  new.respond_to?(method, include_private) || super(method, include_private)
24
22
  end
25
23
  end
26
- end
24
+ end
@@ -4,13 +4,11 @@ require 'angellist_api/connection'
4
4
  require 'angellist_api/request'
5
5
 
6
6
  module AngellistApi
7
- # @private
8
7
  class API
8
+ include Authentication
9
9
  include Connection
10
10
  include Request
11
- include Authentication
12
11
 
13
- # @private
14
12
  attr_accessor *Configuration::VALID_OPTIONS_KEYS
15
13
 
16
14
  # Creates a new API
@@ -21,4 +19,4 @@ module AngellistApi
21
19
  end
22
20
  end
23
21
  end
24
- end
22
+ end
@@ -1,5 +1,4 @@
1
1
  module AngellistApi
2
- # @private
3
2
  module Authentication
4
3
  private
5
4
 
@@ -1,14 +1,20 @@
1
+ require 'cgi'
2
+ require 'angellist_api/api'
3
+
1
4
  module AngellistApi
2
5
  # Wrapper for the AngellistApi REST API
3
6
  #
4
- # @note All methods have been separated into modules and follow the same grouping used in {http://angel.co/api the Angellist API Documentation}.
7
+ # @note All methods have been separated into modules and follow the same
8
+ # grouping used in {http://angel.co/api the Angellist API Documentation}.
5
9
  class Client < API
6
10
  # Require client method modules after initializing the Client class in
7
11
  # order to avoid a superclass mismatch error, allowing those modules to be
8
12
  # Client-namespaced.
9
13
  require 'angellist_api/client/activity_feeds'
10
14
  require 'angellist_api/client/follows'
15
+ require 'angellist_api/client/jobs'
11
16
  require 'angellist_api/client/reviews'
17
+ require 'angellist_api/client/search'
12
18
  require 'angellist_api/client/startups'
13
19
  require 'angellist_api/client/startup_roles'
14
20
  require 'angellist_api/client/status_updates'
@@ -19,7 +25,9 @@ module AngellistApi
19
25
 
20
26
  include AngellistApi::Client::ActivityFeeds
21
27
  include AngellistApi::Client::Follows
28
+ include AngellistApi::Client::Jobs
22
29
  include AngellistApi::Client::Reviews
30
+ include AngellistApi::Client::Search
23
31
  include AngellistApi::Client::Startups
24
32
  include AngellistApi::Client::StartupRoles
25
33
  include AngellistApi::Client::StatusUpdates
@@ -1,19 +1,40 @@
1
1
  module AngellistApi
2
2
  class Client
3
3
  # Defines methods related to URLs
4
+ #
5
+ # @see http://angel.co/api/spec/activity_feeds
4
6
  module ActivityFeeds
5
-
6
- # Returns site activity. If authenticated and the personalized parameter is passed in, only activity from the authenticated user's social graph is returned. No more than 25 items will be returned. Results are paginated and ordered by most recent story first.
7
+
8
+ # Returns site activity. If authenticated and the personalized parameter
9
+ # is passed in, only activity from the authenticated user's social graph
10
+ # is returned. No more than 25 items will be returned. Results are
11
+ # paginated and ordered by most recent story first.
12
+ #
7
13
  # @requires_authentication Optional
8
- # @response_format `json`
14
+ #
9
15
  # @param options [Hash] A customizable set of options.
10
- # @option options [Integer] :personalized If set to 1 and a user is authenticated, only activity from the authenticated user's social graph is returned.
11
- # @example
16
+ # @option options [Integer] :personalized If set to 1 and a user is
17
+ # authenticated, only activity from the authenticated user's social graph
18
+ # is returned.
19
+ #
20
+ # @example
12
21
  # AngellistApi.get_feed
13
22
  def get_feed(options={})
14
- get("1/feed", options, :format => :json, :phoenix => true)
23
+ get("1/feed", options)
24
+ end
25
+
26
+ # Returns a specific activity feed item.
27
+ #
28
+ # @requires_authentication No
29
+ #
30
+ # @param id [String] String ID of the feed item to retrieve.
31
+ #
32
+ # @example Get a feed item.
33
+ # AngellistApi.feed_item('8fCC3')
34
+ def feed_item(id)
35
+ get("1/feed/#{id}")
15
36
  end
16
-
17
37
  end
18
38
  end
19
- end
39
+ end
40
+
@@ -1,96 +1,138 @@
1
1
  module AngellistApi
2
2
  class Client
3
3
  # Defines methods related to URLs
4
+ #
5
+ # @see http://angel.co/api/spec/follows
4
6
  module Follows
5
- # Makes the authenticated user follow the specified item. Returns the new follow on success, or an error on failure.
7
+ # Makes the authenticated user follow the specified item. Returns the new
8
+ # follow on success, or an error on failure.
9
+ #
6
10
  # @requires_authentication Yes
7
- # @response_format `json`
8
- # @param options [Hash] A customizable set of options.
9
- # @option options [String] :type Must be either user or startup.
11
+ #
12
+ # @param [Hash] options A customizable set of options.
13
+ # @option options [String] :type Must be either user or startup.
10
14
  # @option options [Integer] :id The id of the user or startup to start following.
11
- # @example Makes the authenticated user follow the specified item. Returns the new follow on success, or an error on failure.
12
- # AngellistApi.new_follow
15
+ #
16
+ # @example Follow a startup with the authenticated user.
17
+ # AngellistApi.new_follow(:type => :startup, :id => 12345)
13
18
  def new_follow(options={})
14
- post("1/follows", options, :format => :json, :phoenix => true)
19
+ post("1/follows", options)
15
20
  end
16
-
17
- # Makes the authenticated user stop following the specified item. Returns the deleted follow on success, or an error on failure.
21
+
22
+ # Makes the authenticated user stop following the specified item. Returns
23
+ # the deleted follow on success, or an error on failure.
24
+ #
18
25
  # @requires_authentication Yes
19
- # @response_format `json`
20
- # @param options [Hash] A customizable set of options.
21
- # @option options [String] :type Must be either user or startup.
26
+ #
27
+ # @param [Hash] options A customizable set of options.
28
+ # @option options [String] :type Must be either user or startup.
22
29
  # @option options [Integer] :id The id of the user or startup to start following.
23
- # @example Makes the authenticated user stop following the specified item. Returns the deleted follow on success, or an error on failure.
24
- # AngellistApi.delete_follow
30
+ #
31
+ # @example Make the authenticated user stop following a startup.
32
+ # AngellistApi.delete_follow(:type => :startup, :id => 12345)
25
33
  def delete_follow(options={})
26
- delete("1/follows", options, :format => :json, :phoenix => true)
34
+ delete("1/follows", options)
27
35
  end
28
-
29
- # Return the given user's followers, paginated and ordered by most recent follower first.
36
+
37
+ # Returns the follower and followed information based on comma-separated
38
+ # follow ids, such as those from the activity feed.
39
+ #
40
+ # @requires_authentication Optional
41
+ #
42
+ # @param ids [Array] IDs of the follows to fetch.
43
+ #
44
+ # @example Get follower and followed information for a batch of follows.
45
+ # AngellistApi.get_follows([1, 2, 3])
46
+ def get_follows(ids)
47
+ params = { :ids => ids.join(',') }
48
+ get("1/follows/batch", params)
49
+ end
50
+
51
+ # Return the given user's followers, paginated and ordered by most recent
52
+ # follower first.
53
+ #
30
54
  # @requires_authentication No
31
- # @response_format `json`
32
- # @param options [Integer] The id of the given user.
33
- # @example Return the given user's followers, paginated and ordered by most recent follower first.
34
- # AngellistApi.get_user_followers
55
+ #
56
+ # @param [Integer] id The id of the given user.
57
+ #
58
+ # @example Get followers of user with ID 12345.
59
+ # AngellistApi.get_user_followers(12345)
35
60
  def get_user_followers(id)
36
- get("1/users/#{id}/followers", :format => :json, :phoenix => true)
61
+ get("1/users/#{id}/followers")
37
62
  end
38
-
39
- # Return the ids of the given user's followers, paginated and ordered by most recent follower first.
63
+
64
+ # Return the ids of the given user's followers, paginated and ordered by
65
+ # most recent follower first.
66
+ #
40
67
  # @requires_authentication No
41
- # @response_format `json`
42
- # @param options [Integer] The id of the given user.
43
- # @example Return the ids of the given user's followers, paginated and ordered by most recent follower first.
44
- # AngellistApi.get_user_follower_ids
68
+ #
69
+ # @param [Integer] id The id of the given user.
70
+ #
71
+ # @example Get IDs of the followers of user with ID 12345.
72
+ # AngellistApi.get_user_follower_ids(12345)
45
73
  def get_user_follower_ids(id)
46
- get("1/users/#{id}/followers/ids", :format => :json, :phoenix => true)
74
+ get("1/users/#{id}/followers/ids")
47
75
  end
48
-
49
- # Return objects that the given user is following, paginated and ordered by most recent follow first. See the type parameter to specify which class of objects to return.
76
+
77
+ # Return objects that the given user is following, paginated and ordered
78
+ # by most recent follow first. See the type parameter to specify which
79
+ # class of objects to return.
80
+ #
50
81
  # @requires_authentication Optional
51
- # @response_format `json`
52
- # @param id [Integer] The id of the given user.
53
- # @param options [Hash] A customizable set of options.
54
- # @option options [String] :type Must be either user or startup.
55
- # @example Return objects that the given user is following, paginated and ordered by most recent follow first. See the type parameter to specify which class of objects to return.
56
- # AngellistApi.get_user_following
82
+ #
83
+ # @param [Integer] id The id of the given user.
84
+ # @param [Hash] options A customizable set of options.
85
+ # @option options [String] :type ('user') Must be either user or startup.
86
+ #
87
+ # @example Get startups that user with ID 1234 is following.
88
+ # AngellistApi.get_user_following(1234, :type => :startup)
57
89
  def get_user_following(id, options={})
58
- get("1/users/#{id}/following", options, :format => :json, :phoenix => true)
90
+ get("1/users/#{id}/following", options)
59
91
  end
60
-
61
- # Return ids of objects that the given user is following, paginated and ordered by most recent follow first. See the type parameter to specify which class of objects to return. Responds like GET /users/:id/followers/ids.
92
+
93
+ # Return ids of objects that the given user is following, paginated and
94
+ # ordered by most recent follow first. See the type parameter to specify
95
+ # which class of objects to return. Responds like GET
96
+ # /users/:id/followers/ids.
97
+ #
62
98
  # @requires_authentication Optional
63
- # @response_format `json`
64
- # @param id [Integer] The id of the given user.
65
- # @param options [Hash] A customizable set of options.
66
- # @option options [String] :type Must be either user or startup.
67
- # @example Return ids of objects that the given user is following, paginated and ordered by most recent follow first. See the type parameter to specify which class of objects to return. Responds like GET /users/:id/followers/ids.
68
- # AngellistApi.get_user_following_ids
99
+ #
100
+ # @param [Integer] id The id of the given user.
101
+ # @param [Hash] options A customizable set of options.
102
+ # @option options [String] :type ('user') Must be either user or startup.
103
+ #
104
+ # @example Get IDs of startups that user with ID 1234 is following.
105
+ # AngellistApi.get_user_following_ids(1234, :type => :startup)
69
106
  def get_user_following_ids(id, options={})
70
- get("1/users/#{id}/following/ids", options, :format => :json, :phoenix => true)
107
+ get("1/users/#{id}/following/ids", options)
71
108
  end
72
-
73
- # Returns the given startup's followers, paginated and ordered by most recent follower first. Responds like GET /users/:id/followers.
109
+
110
+ # Returns the given startup's followers, paginated and ordered by most
111
+ # recent follower first. Responds like GET /users/:id/followers.
112
+ #
74
113
  # @requires_authentication Optional
75
- # @response_format `json`
76
- # @param id [Integer] The id of the given user.
77
- # @param options [Hash] A customizable set of options.
78
- # @example Returns the given startup's followers, paginated and ordered by most recent follower first. Responds like GET /users/:id/followers.
79
- # AngellistApi.get_startup_followers
114
+ #
115
+ # @param [Integer] id The id of the given startup.
116
+ #
117
+ # @example Get followers of startup with ID 1234.
118
+ # AngellistApi.get_startup_followers(1234)
80
119
  def get_startup_followers(id)
81
- get("1/startups/#{id}/followers", :format => :json, :phoenix => true)
120
+ get("1/startups/#{id}/followers")
82
121
  end
83
-
84
- # Returns the ids of the given startup's followers, paginated and ordered by most recent follower first. Responds like GET /users/:id/followers.
122
+
123
+ # Returns the ids of the given startup's followers, paginated and ordered
124
+ # by most recent follower first. Responds like GET /users/:id/followers.
125
+ #
85
126
  # @requires_authentication Optional
86
- # @response_format `json`
87
- # @param id [Integer] The id of the given user.
88
- # @param options [Hash] A customizable set of options.
89
- # @example Returns the ids of the given startup's followers, paginated and ordered by most recent follower first. Responds like GET /users/:id/followers.
90
- # AngellistApi.get_startup_follower_ids
127
+ #
128
+ # @param [Integer] id The id of the given user.
129
+ #
130
+ # @example Get IDs of followers of startup with ID 1234.
131
+ # AngellistApi.get_startup_follower_ids(1234)
91
132
  def get_startup_follower_ids(id)
92
- get("1/startups/#{id}/followers/ids", :format => :json, :phoenix => true)
133
+ get("1/startups/#{id}/followers/ids")
93
134
  end
94
135
  end
95
136
  end
96
137
  end
138
+
@@ -0,0 +1,72 @@
1
+ module AngellistApi
2
+ class Client
3
+ # Defines methods related to URLs
4
+ #
5
+ # @see http://angel.co/api/spec/jobs
6
+ module Jobs
7
+
8
+ # Returns all jobs that have been posted. Results are paginated and
9
+ # ordered by publish date descending.
10
+ #
11
+ # @requires_authentication No
12
+ # @paginated Yes
13
+ #
14
+ # @param options [Hash] A customizable set of options.
15
+ # @option options [Integer] :page Specifies the page of results to
16
+ # retrieve.
17
+ # @option options [Integer] :per_page (50) The number of results to return
18
+ # for a page. Maximum of 50.
19
+ #
20
+ # @note Pagination metadata does not actually appear to be returned
21
+ # currently, but the page parameter works. Have inquired with AngelList
22
+ # about this.
23
+ def get_jobs(options={})
24
+ get("1/jobs", options)
25
+ end
26
+
27
+ # Shows details for a specific job, including the startup that posted it.
28
+ #
29
+ # @requires_authentication No
30
+ #
31
+ # @param id [Integer] ID of the job to fetch.
32
+ #
33
+ # @example Get information for a job.
34
+ # AngellistApi.get_job(137)
35
+ def get_job(id)
36
+ get("1/jobs/#{id}")
37
+ end
38
+
39
+ # For a given startup id, returns all the jobs that have been posted.
40
+ #
41
+ # @requires_authentication No
42
+ # @paginated No
43
+ #
44
+ # @param id [Integer] ID of the desired startup.
45
+ #
46
+ # @example Get jobs for a given startup by ID.
47
+ # AngellistApi.get_startup_jobs(1234)
48
+ def get_startup_jobs(id)
49
+ get("1/startups/#{id}/jobs")
50
+ end
51
+
52
+ # For a given LocationTag id, returns all jobs posted in that tag.
53
+ #
54
+ # @requires_authentication No
55
+ # @paginated Yes
56
+ #
57
+ # @param id [Integer] ID of the desired tag.
58
+ # @param options [Hash] A customizable set of options.
59
+ # @option options [Integer] :page Specifies the page of results to
60
+ # retrieve.
61
+ # @option options [Integer] :per_page (50) The number of results to return
62
+ # for a page. Maximum of 50.
63
+ #
64
+ # @example Get jobs tagged San Francisco.
65
+ # AngellistApi.get_tag_jobs(1692)
66
+ def get_tag_jobs(id, options={})
67
+ get("1/tags/#{id}/jobs", options)
68
+ end
69
+ end
70
+ end
71
+ end
72
+