You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.
I want to query for all user apps, synced: 0, and expanded: 1 to get the supported devices.
I found I can do this by just calling get_org_apps, passing it a user authentication token, and expanded: 1, but this seems like not the intended use case. Would it be more appropriate for a method get_user_apps that takes a params hash (which could contain the user authentication token as well as any other params like expanded or future supported ones). Then get_user_synced_apps would just call this method and pass in synced: 1 as well.
Maybe something like this (untested)
def get_user_synced_apps(options = {})
get_user_apps(options.merge(synced: 1))
end
alias :get_synced_apps :get_user_synced_apps
def get_user_apps(options = {})
auth_token = options.delete(:authentication_token)
build_response(
get_request(
:apps,
authentication_token: auth_token,
options
)
)
end
Thanks,
Alex
The text was updated successfully, but these errors were encountered:
I don't see that our docs cover this query param @jeff-brown-validic (can we get that added?), but testing it locally it seems that if I don't supply a synced param it defaults to all. If that's the case the options[:synced] ||= 0 would be merely for self documentation.
Anthony
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I want to query for all user apps, synced: 0, and expanded: 1 to get the supported devices.
I found I can do this by just calling get_org_apps, passing it a user authentication token, and expanded: 1, but this seems like not the intended use case. Would it be more appropriate for a method get_user_apps that takes a params hash (which could contain the user authentication token as well as any other params like expanded or future supported ones). Then get_user_synced_apps would just call this method and pass in synced: 1 as well.
Maybe something like this (untested)
Thanks,
Alex
The text was updated successfully, but these errors were encountered: