Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Non Synced User apps #45

Description

@alex-bezek

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions