Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Client::User methods now return pagination data where expected. #28

Closed
wants to merge 5 commits into from

3 participants

@jasonm23

Addressing the disposal of pagination data by User methods, response["data"] replaced with response, where pagination is possible.

@yaauie

While this breaks the expectations set by previous releases, it brings all the methods in this module to consistency with each other and with the underlying API, which I like.

+1, using in our fork.

EDIT: Submitting a new pull (#41) that also breaks expectations, but does so in a way that brings all methods (not just user methods) into alignment.

@shayne shayne closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 21, 2012
  1. @jasonm23
Commits on Apr 3, 2012
  1. @jasonm23
  2. @jasonm23
Commits on Apr 20, 2012
  1. @jasonm23

    Update instagram.gemspec

    jasonm23 authored
Commits on Apr 21, 2012
  1. @jasonm23
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/instagram/client/users.rb
View
14 lib/instagram/client/users.rb
@@ -29,13 +29,13 @@ def user(*args)
# @param query [String] The search query to run against user search.
# @param options [Hash] A customizable set of options.
# @option options [Integer] :count The number of users to retrieve.
- # @return [Array]
+ # @return [Hashie::Mash]
# @see TODO:doc url
# @example Return users that match "Shayne Sweeney"
# Instagram.user_search("Shayne Sweeney")
def user_search(query, options={})
response = get('users/search', options.merge(:q => query))
- response["data"]
+ response
end
# Returns a list of users whom a given user follows
@@ -63,7 +63,7 @@ def user_follows(*args)
options = args.last.is_a?(Hash) ? args.pop : {}
id = args.first || "self"
response = get("users/#{id}/follows", options)
- response["data"]
+ response
end
end
@@ -92,7 +92,7 @@ def user_followed_by(*args)
options = args.last.is_a?(Hash) ? args.pop : {}
id = args.first || "self"
response = get("users/#{id}/followed-by", options)
- response["data"]
+ response
end
# Returns a list of users whom a given user is followed by
@@ -112,7 +112,7 @@ def user_followed_by(*args)
# @rate_limited true
def user_requested_by()
response = get("users/self/requested-by")
- response["data"]
+ response
end
# Returns most recent media items from the currently authorized user's feed.
@@ -122,7 +122,7 @@ def user_requested_by()
# @option options [Integer] :max_id Returns results with an ID less than (that is, older than) or equal to the specified ID.
# @option options [Integer] :min_id Return media later than this min_id
# @option options [Integer] :count Specifies the number of records to retrieve, per page.
- # @return [Array]
+ # @return [Hashie::Mash]
# @example Return most recent media images that would appear on @shayne's feed
# Instagram.user_media_feed() # assuming @shayne is the authorized user
# @format :json
@@ -160,7 +160,7 @@ def user_recent_media(*args)
options = args.last.is_a?(Hash) ? args.pop : {}
id = args.first || "self"
response = get("users/#{id}/media/recent", options)
- response["data"]
+ response
end
# Returns a list of media items liked by the current user
Something went wrong with that request. Please try again.