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,17 +1,28 @@
1
1
  module AngellistApi
2
2
  class Client
3
3
  # Defines methods related to URLs
4
+ #
5
+ # @see http://angel.co/api/spec/reviews
4
6
  module Reviews
5
- # Return reviews for the given user. If no user given, the authenticated user is used. Reviews are paginated and ordered by most recent first. Also returns the total count of positive reviews.
7
+ # Return reviews for the given user. If no user given, the authenticated
8
+ # user is used. Reviews are paginated and ordered by most recent first.
9
+ # Also returns the total count of positive reviews.
10
+ #
6
11
  # @requires_authentication Optional
7
- # @response_format `json`
8
- # @param options [Hash] A customizable set of options.
9
- # @option options [Integer] :user_id user_id of the desired user. If none given, defaults to the authenticated user.
10
- # @example Return reviews for the given user. If no user given, the authenticated user is used. Reviews are paginated and ordered by most recent first. Also returns the total count of positive reviews.
12
+ #
13
+ # @param [Hash] options A customizable set of options.
14
+ # @option options [Integer] :user_id user_id of the desired user. If none
15
+ # given, defaults to the authenticated user.
16
+ #
17
+ # @example Get reviews for the authenticated user.
11
18
  # AngellistApi.get_reviews
19
+ #
20
+ # @example Get reviews for a given user ID.
21
+ # AngellistApi.get_reviews(:user_id => 1234)
12
22
  def get_reviews(options={})
13
- get("1/reviews", options, :format => :json, :phoenix => true)
23
+ get("1/reviews", options)
14
24
  end
15
25
  end
16
26
  end
17
27
  end
28
+
@@ -0,0 +1,31 @@
1
+ module AngellistApi
2
+ class Client
3
+ # Defines methods related to URLs
4
+ #
5
+ # @see http://angel.co/api/spec/search
6
+ module Search
7
+ # Search for Startups, Users, MarketTags and LocationTags, optionally
8
+ # narrowing the results by type. Results are sorted by a mix of match and
9
+ # popularity.
10
+ #
11
+ # @requires_authentication No
12
+ # @paginated No
13
+ #
14
+ # @param query [String] The search query. Will be URI-escaped.
15
+ # @param options [Hash] A customizable set of options.
16
+ # @option options [String] :type A scope for the query. Can be one of
17
+ # 'User', 'Startup', 'MarketTag' or 'LocationTag'.
18
+ #
19
+ # @example Search all data types.
20
+ # AngellistApi.search('machine learning')
21
+ #
22
+ # @example Search locations.
23
+ # AngellistApi.search('springfield', :type => 'LocationTag')
24
+ def search(query, options={})
25
+ options.merge!(:query => CGI.escape(query))
26
+ get("1/search", options)
27
+ end
28
+ end
29
+ end
30
+ end
31
+
@@ -1,18 +1,33 @@
1
1
  module AngellistApi
2
2
  class Client
3
3
  # Defines methods related to URLs
4
- module StartupRoles
5
- # Given a startup_id, returns the users involved in that startup. Given a user_id, returns the startups that user is involved in. If neither parameter is given, the authenticated user is used. Possible roles include team_member, past_investor, advisor and referrer. Roles are paginated and ordered by most recently declared first.
4
+ #
5
+ # @see http://angel.co/api/spec/startup_roles
6
+ module StartupRoles
7
+ # Given a startup_id, returns the users involved in that startup. Given a
8
+ # user_id, returns the startups that user is involved in. If neither
9
+ # parameter is given, the authenticated user is used. Possible roles
10
+ # include founder, employee, past_investor, advisor, incubator and
11
+ # referrer. Roles are paginated and ordered by most recently declared
12
+ # first.
13
+ #
6
14
  # @requires_authentication Optional
7
- # @response_format `json`
8
- # @param options [Hash] A customizable set of options.
9
- # @option options [Integer] :user_id The user who's startup relationships you want to view.
10
- # @option options [Integer] :startup_id The startup who's user relationships you want to view.
11
- # @example Given a startup_id, returns the users involved in that startup. Given a user_id, returns the startups that user is involved in. If neither parameter is given, the authenticated user is used. Possible roles include team_member, past_investor, advisor and referrer. Roles are paginated and ordered by most recently declared first.
15
+ #
16
+ # @param [Hash] options A customizable set of options.
17
+ # @option options [Integer] :user_id The user whose startup relationships
18
+ # you want to view.
19
+ # @option options [Integer] :startup_id The startup whose user
20
+ # relationships you want to view.
21
+ #
22
+ # @example Get info about authenticated user's startups and roles.
12
23
  # AngellistApi.get_startup_roles
24
+ #
25
+ # @example Get users involved in startup with ID 1234, and their roles.
26
+ # AngellistApi.get_startup_roles(:startup_id => 1234)
13
27
  def get_startup_roles(options={})
14
- get("1/startup_roles", options, :format => :json, :phoenix => true)
28
+ get("1/startup_roles", options)
15
29
  end
16
30
  end
17
31
  end
18
32
  end
33
+
@@ -1,28 +1,64 @@
1
1
  module AngellistApi
2
2
  class Client
3
3
  # Defines methods related to URLs
4
+ #
5
+ # @see http://angel.co/api/spec/startups
4
6
  module Startups
5
- # Get a startup's information given an id.
7
+ # Get a startup's information given an ID.
8
+ #
6
9
  # @requires_authentication Optional
7
- # @response_format `json`
8
- # @param id [Integer] :id id of the desired startup.
9
- # @example Get a startup's information given an id.
10
- # AngellistApi.get_startup
10
+ #
11
+ # @param [Integer] id ID of the desired startup.
12
+ #
13
+ # @example Get a startup's information given an ID.
14
+ # AngellistApi.get_startup(1234)
11
15
  def get_startup(id)
12
- get("1/startups/#{id}", :format => :json, :phoenix => true)
16
+ get("1/startups/#{id}")
13
17
  end
14
-
18
+
19
+ # Returns the comments on the given startup.
20
+ #
21
+ # @requires_authentication Optional
22
+ # @paginated No
23
+ #
24
+ # @param id [Integer] ID of the desired startup.
25
+ #
26
+ # @example Get comments left about a startup with ID 1234.
27
+ # AngellistApi.startup_comments(1234)
28
+ def startup_comments(id)
29
+ get("1/startups/#{id}/comments")
30
+ end
31
+
32
+ # Returns up to 50 startups at a time, given an Array of ids.
33
+ #
34
+ # @requires_authentication Optional
35
+ #
36
+ # @param ids [Array] IDs of the startups to fetch.
37
+ #
38
+ # @example Get information for a batch of startups.
39
+ # AngellistApi.get_startups([1, 2, 3])
40
+ def get_startups(ids)
41
+ params = { :ids => ids.join(',') }
42
+ get("1/startups/batch", params)
43
+ end
44
+
15
45
  # Search for a startup given a URL slug. Responds like GET /startups/:id.
46
+ #
16
47
  # @requires_authentication Optional
17
- # @response_format `json`
18
- # @param options [Hash] A customizable set of options.
19
- # @option options [String] :slug The URL slug of the desired startup.
20
- # @option options [String] :domain The domain of the desired startup. Subdomains are not allowed. Keep in mind that startups can list any domain as their own. The startup with the most followers will be returned in the case of multiple hits.
48
+ #
49
+ # @param [Hash] options A customizable set of options.
50
+ # @option options [String] :slug The URL slug of the desired startup.
51
+ # @option options [String] :domain The domain of the desired startup.
52
+ # Subdomains are not allowed. Keep in mind that startups can list any
53
+ # domain as their own. The startup with the most followers will be
54
+ # returned in the case of multiple hits.
55
+ #
21
56
  # @example Search for a startup given a URL slug. Responds like GET /startups/:id.
22
- # AngellistApi.startup_search
57
+ # AngellistApi.startup_search(:slug => '500-startups-fund')
23
58
  def startup_search(options={})
24
- get("1/startups/search", options, :format => :json, :phoenix => true)
59
+ get("1/startups/search", options)
25
60
  end
26
61
  end
27
62
  end
28
63
  end
64
+
@@ -1,40 +1,61 @@
1
1
  module AngellistApi
2
2
  class Client
3
3
  # Defines methods related to URLs
4
- module StatusUpdates
5
- # Return status updates from the given user or startup. If neither is specified, the authenticated user is used. Status updates are paginated and ordered by most recent first.
4
+ #
5
+ # @see http://angel.co/api/spec/status_updates
6
+ module StatusUpdates
7
+ # Return status updates from the given user or startup. If neither is
8
+ # specified, the authenticated user is used. Status updates are paginated
9
+ # and ordered by most recent first.
10
+ #
6
11
  # @requires_authentication Optional
7
- # @response_format `json`
8
- # @param options [Hash] A customizable set of options.
9
- # @option options [Integer] :user_id id of the desired user.
10
- # @option options [Integer] :startup_id id of the desired startup.
11
- # @example Return status updates from the given user or startup. If neither is specified, the authenticated user is used. Status updates are paginated and ordered by most recent first.
12
+ #
13
+ # @param [Hash] options A customizable set of options.
14
+ # @option options [Integer] :user_id id of the desired user.
15
+ # @option options [Integer] :startup_id id of the desired startup.
16
+ #
17
+ # @example Get status updates for the authenticated user.
12
18
  # AngellistApi.get_status_updates
19
+ #
20
+ # @example Get status updates for the startup with ID 1234.
21
+ # AngellistApi.get_status_updates(:startup_id => 1234)
13
22
  def get_status_updates(options={})
14
- get("1/status_updates", options, :format => :json, :phoenix => true)
23
+ get("1/status_updates", options)
15
24
  end
16
-
17
- # Creates a status update for the authenticated user or for a startup the authenticated user is a team member of. Returns the new status update on success, or an error on failure.
25
+
26
+ # Creates a status update for the authenticated user or for a startup the
27
+ # authenticated user is a team member of. Returns the new status update
28
+ # on success, or an error on failure.
29
+ #
18
30
  # @requires_authentication Yes
19
- # @response_format `json`
20
- # @param options [Hash] A customizable set of options.
21
- # @option options [String] :message The new status. Must be between 1 and 140 characters.
22
- # @option options [Integer] :startup_id id of the startup whose status you want to update. If unspecified, the authenticated user's status is updated.
23
- # @example Creates a status update for the authenticated user or for a startup the authenticated user is a team member of. Returns the new status update on success, or an error on failure.
24
- # AngellistApi.post_status_updates
31
+ #
32
+ # @param [Hash] options A customizable set of options.
33
+ # @option options [String] :message The new status. Must be between 1 and
34
+ # 140 characters.
35
+ # @option options [Integer] :startup_id id of the startup whose status
36
+ # you want to update. If unspecified, the authenticated user's status
37
+ # is updated.
38
+ #
39
+ # @example Update the authenticated user's status.
40
+ # AngellistApi.post_status_updates(:message => "Startup advice: Don't fuck up.")
25
41
  def post_status_updates(options={})
26
- post("1/status_updates", options, :format => :json, :phoenix => true)
42
+ post("1/status_updates", options)
27
43
  end
28
-
29
- # Destroys the specified status update belonging to the authenticated user or to a startup the authenticated user is a team member of. Returns the destroyed status update on success, or an error on failure.
44
+
45
+ # Destroys the specified status update belonging to the authenticated
46
+ # user or to a startup the authenticated user is a team member of.
47
+ # Returns the destroyed status update on success, or an error on failure.
48
+ #
30
49
  # @requires_authentication Yes
31
- # @response_format `json`
32
- # @param id [Integer] id of the desired status message.
33
- # @example Destroys the specified status update belonging to the authenticated user or to a startup the authenticated user is a team member of. Returns the destroyed status update on success, or an error on failure.
34
- # AngellistApi.delete_status_updates
50
+ #
51
+ # @param [Integer] id ID of the desired status message.
52
+ #
53
+ # @example Destroys specified status update belonging to authenticated user.
54
+ # AngellistApi.delete_status_updates(1234)
35
55
  def delete_status_updates(id)
36
- delete("1/status_updates/#{id}", :format => :json, :phoenix => true)
56
+ delete("1/status_updates/#{id}")
37
57
  end
38
58
  end
39
59
  end
40
60
  end
61
+
@@ -1,47 +1,69 @@
1
1
  module AngellistApi
2
2
  class Client
3
- # Defines methods related to URLs
4
- module Tags
5
- # Get information on a tag
3
+ # Defines methods related to URLs.
4
+ #
5
+ # @see http://angel.co/api/spec/tags
6
+ module Tags
7
+ # Get information on a tag.
8
+ #
6
9
  # @requires_authentication No
7
- # @response_format `json`
8
- # @param id [Integer] id of the desired tag.
9
- # @example Get information on a tag
10
- # AngellistApi.get_tag
10
+ #
11
+ # @param [Integer] id ID of the desired tag.
12
+ #
13
+ # @example Get information on a tag.
14
+ # AngellistApi.get_tag(1654)
11
15
  def get_tag(id)
12
- get("1/tags/#{id}", :format => :json, :phoenix => true)
16
+ get("1/tags/#{id}")
13
17
  end
14
-
15
- # Returns children of the given tag. Market and location tags form a Directed Acyclic Graph. Results are paginated and ordered by id descending.
18
+
19
+ # Returns children of the given tag. Market and location tags form a
20
+ # Directed Acyclic Graph. Results are paginated and ordered by id
21
+ # descending.
22
+ #
16
23
  # @requires_authentication No
17
- # @response_format `json`
18
- # @param id [Integer] The id of the desired tag. Currently only works for tags of type MarketTag or LocationTag.
19
- # @example Returns children of the given tag. Market and location tags form a Directed Acyclic Graph. Results are paginated and ordered by id descending.
20
- # AngellistApi.get_tag_children
24
+ #
25
+ # @param [Integer] id The id of the desired tag. Currently only works for
26
+ # tags of type MarketTag or LocationTag.
27
+ #
28
+ # @example Get children of a tag.
29
+ # AngellistApi.get_tag_children(1654)
21
30
  def get_tag_children(id)
22
- get("1/tags/#{id}/children", :format => :json, :phoenix => true)
31
+ get("1/tags/#{id}/children")
23
32
  end
24
-
25
- # Returns parents of the given tag. For more details, see the documentation for GET /tags/:id/children.
33
+
34
+ # Returns parents of the given tag. For more details, see the
35
+ # documentation for GET /tags/:id/children.
36
+ #
26
37
  # @requires_authentication No
27
- # @response_format `json`
28
- # @param id [Integer] The id of the desired tag. Currently only works for tags of type MarketTag or LocationTag.
29
- # @example Returns parents of the given tag. For more details, see the documentation for GET /tags/:id/children.
30
- # AngellistApi.get_tag_parents
38
+ #
39
+ # @param [Integer] id The id of the desired tag. Currently only works for
40
+ # tags of type MarketTag or LocationTag.
41
+ #
42
+ # @example Get parents of a tag.
43
+ # AngellistApi.get_tag_parents(1654)
31
44
  def get_tag_parents(id)
32
- get("1/tags/#{id}/parents", :format => :json, :phoenix => true)
45
+ get("1/tags/#{id}/parents")
33
46
  end
34
-
35
- # Returns startups that are tagged with the given tag or a child of the given tag. Results are paginated and ordered according to the order parameter.
47
+
48
+ # Returns startups that are tagged with the given tag or a child of the
49
+ # given tag. Results are paginated and ordered according to the order
50
+ # parameter.
51
+ #
36
52
  # @requires_authentication Optional
37
- # @response_format `json`
38
- # @param options [Hash] A customizable set of options.
39
- # @option options [String] :order May be one of popularity, asc or desc. Startups will be ordered by number of followers, ascending id or descending id, respectively. Defaults to desc
40
- # @example Returns Returns startups that are tagged with the given tag or a child of the given tag. Results are paginated and ordered according to the order parameter.
41
- # AngellistApi.get_tag_startups
53
+ #
54
+ # @param [Hash] options A customizable set of options.
55
+ # @option options [String] :order May be one of popularity, asc or desc.
56
+ # Startups will be ordered by number of followers, ascending id or
57
+ # descending id, respectively. Defaults to desc
58
+ #
59
+ # @example Get startups tagged with tag ID or its children.
60
+ # AngellistApi.get_tag_startups(1654)
61
+ #
62
+ # @see http://angel.co/api/spec/startups
42
63
  def get_tag_startups(id, options = {})
43
- get("1/tags/#{id}/startups", options, :format => :json, :phoenix => true)
64
+ get("1/tags/#{id}/startups", options)
44
65
  end
45
66
  end
46
67
  end
47
68
  end
69
+
@@ -1,37 +1,59 @@
1
1
  module AngellistApi
2
2
  class Client
3
3
  # Defines methods related to URLs
4
+ #
5
+ # @see http://angel.co/api/spec/users
4
6
  module Users
5
7
  # Get a user's information given an id.
8
+ #
6
9
  # @requires_authentication No
7
- # @response_format `json`
8
- # @param id [Integer] :id id of the desired user.
10
+ #
11
+ # @param [Integer] id ID of the desired user.
12
+ #
9
13
  # @example Get a user's information given an id.
10
- # AngellistApi.get_user
14
+ # AngellistApi.get_user(1234)
11
15
  def get_user(id)
12
- get("1/users/#{id}", :format => :json, :phoenix => true)
16
+ get("1/users/#{id}")
13
17
  end
14
-
18
+
19
+ # Get information for a batch of up to 50 users given a list of user IDs.
20
+ #
21
+ # @requires_authentication No
22
+ #
23
+ # @param [Array] ids IDs of the users to fetch.
24
+ #
25
+ # @example Get information for a batch of users.
26
+ # AngellistApi.get_users([1, 2, 3])
27
+ def get_users(ids)
28
+ params = { :ids => ids.join(',') }
29
+ get("1/users/batch", params)
30
+ end
31
+
15
32
  # Search for a user given a URL slug. Responds like GET /users/:id.
33
+ #
16
34
  # @requires_authentication No
17
- # @response_format `json`
18
- # @param options [Hash] A customizable set of options.
19
- # @option options [String] :slug The URL slug of the desired user.
20
- # @option options [String] :md5 An md5 hash of the email address of the desired user.
21
- # @example Search for a user given a URL slug or md5 hash of an email address. Responds like GET /users/:id.
22
- # AngellistApi.user_search
35
+ #
36
+ # @param [Hash] options A customizable set of options.
37
+ # @option options [String] :slug The URL slug of the desired user.
38
+ # @option options [String] :md5 An md5 hash of the email address of the
39
+ # desired user.
40
+ #
41
+ # @example Search for a user by URL slug.
42
+ # AngellistApi.user_search(:slug => '500startups')
23
43
  def user_search(options={})
24
- get("1/users/search", options, :format => :json, :phoenix => true)
44
+ get("1/users/search", options)
25
45
  end
26
-
46
+
27
47
  # Get the current user's information. Responds like GET /users/:id.
48
+ #
28
49
  # @requires_authentication Yes
29
- # @response_format `json`
30
- # @example Get the current user's information. Responds like GET /users/:id.
31
- # AngellistApi.user_search
50
+ #
51
+ # @example Get the authenticated user's information.
52
+ # AngellistApi.me
32
53
  def me
33
- get("1/me", :format => :json, :phoenix => true)
54
+ get("1/me")
34
55
  end
35
56
  end
36
57
  end
37
58
  end
59
+