Get groups subscriber belongs to

@param  int   $subscriberId
@param  array $params
@return [type]
558727
public function getGroups($subscriberId, $params = [])
    {
        $endpoint = $this->endpoint . '/' . urlencode($subscriberId) . '/groups';

        $params = array_merge($this->prepareParams(), $params);

        $response = $this->restClient->get($endpoint, $params);

        return $response['body'];
    }
778420
public function getSubscriptions()
    {
        if (!$this->__subscriptions) {
            $subscriptions = array();

            //Get all the public methods
            //$reflection = new ReflectionClass($this);
            //foreach ($reflection->getMethods(ReflectionMethod::IS_PUBLIC) as $method)
            foreach ($this->getMethods() as $method) {
                if (substr($method, 0, 2) == 'on') {
                    $subscriptions[] = $method;
                }
            }

            $this->__subscriptions = $subscriptions;
        }

        return $this->__subscriptions;
    }
898273
public String getSubscriberId()
    {
      if (tc.isEntryEnabled())
        SibTr.entry(tc, "getSubscriberId");

      String subscriberId = _consumerDispatcher.getConsumerDispatcherState().getSubscriberID();
      
      if (tc.isEntryEnabled())
        SibTr.exit(tc, "getSubscriberId", subscriberId);
      return subscriberId;
    }
387967
public function getFor(Customer $customer, $subscriptionId, array $parameters = [])
    {
        $this->parentId = $customer->id;

        return parent::rest_read($subscriptionId, $parameters);
    }
1309650
public function has_subscriber($subscriptions)
    {
        $enabled_components = $this->wrappedObject->enabled_components()->orderBy('order')->pluck('id')->toArray();
        $intersected = array_intersect($enabled_components, $subscriptions);

        return count($intersected) != 0;
    }
633696
public function add_subscriber( EventSubscriber $subscriber ) {

		foreach ( $subscriber->get_subscribed_events() as $event => $params ) {

			if ( is_string( $params ) ) {
				$this->add_listener( $event, array( $subscriber, $params ) );
			} elseif ( is_array( $params ) && isset( $params[0] ) ) {

				$method        = $params[0];
				$priority      = isset( $params[1] ) ? $params[1] : self::PRIORITY;
				$accepted_args = isset( $params[2] ) ? $params[2] : self::ACCEPTED;

				$this->add_listener( $event, array( $subscriber, $method ), $priority, $accepted_args );
			} else {
				throw new \InvalidArgumentException( 'Invalid return format from EventSubscriber.' );
			}
		}

		return $this;
	}
443180
public function get_all_groups($userid) {
        if (isset($this->usergroups[$userid])) {
            return $this->usergroups[$userid];
        }

        $grouping = $this->get_instance()->teamsubmissiongroupingid;
        $return = groups_get_all_groups($this->get_course()->id, $userid, $grouping);

        $this->usergroups[$userid] = $return;

        return $return;
    }
494793
static function countWithSubscriberID( $subscriberID, $languageID =false , $enabled = false )
    {
        $cond = array();
        $cond['subscriber_id'] = $subscriberID;
        if ( $enabled !== false )
        {
            $cond['enabled'] = $enabled;
        }
        if ( $languageID !== false )
        {
            $cond['language_id'] = $languageID;
        }
        $count = eZPersistentObject::count( self::definition(), $cond );
        return $count;
    }
385958
public function getListSubscriber($list, $subscriber)
	{
		$result = $this->client->get("lists/{$list}/subscribers/{$subscriber}");
		return $result ? new Resources\Subscriber($this, $result) : null;
	}
1358567
public function getForumActions($forum_id, $subscriptions, $is_subscribed)
    {
        $forum_actions = [];

        $forum_actions = Container::get('hooks')
            ->fire('model.forum.get_page_head_start', $forum_actions, $forum_id, $subscriptions, $is_subscribed);

        if (!User::get()->is_guest) {
            if ($subscriptions == 1) {
                if ($is_subscribed) {
                    $forum_actions[] = '<span>'.__('Is subscribed').
                        ' - </span><a class="btn btn-primary btn-sm" href="'.
                        Router::pathFor('unsubscribeForum', ['id' => $forum_id]).'">'.__('Unsubscribe').'</a>';
                } else {
                    $forum_actions[] = '<a class="btn btn-primary btn-sm" href="'.
                        Router::pathFor('subscribeForum', ['id' => $forum_id]).'">'.__('Subscribe').'</a>';
                }
            }

            $forum_actions[] = '<a class="btn btn-primary btn-sm" href="'.
                Router::pathFor('markForumRead', ['id' => $forum_id]).'">'.__('Mark forum read').'</a>';
        }

        $forum_actions = Container::get('hooks')->fire('model.forum.get_page_head', $forum_actions);

        return $forum_actions;
    }
391428
public function all($subscription, array $parameters = [])
    {
        $parameters = array_merge($parameters, compact('subscription'));

        return $this->_get('subscription_items', $parameters);
    }
58505
public function listSubscriptions($optParams = array())
  {
    $params = array();
    $params = array_merge($params, $optParams);
    return $this->call('list', array($params), "Google_Service_Mirror_SubscriptionsListResponse");
  }
1171851
def list_resource_groups(access_token, subscription_id):
    '''
    '''
    endpoint = ''.join([get_rm_endpoint(),
                        '/subscriptions/', subscription_id,
                        '/resourceGroups/',
                        '?api-version=', RESOURCE_API])
    return do_get(endpoint, access_token)
449427
public static function getCommonGroups($uid, $pid)
	{
		// Get the groups the visiting user
		$xgroups = self::getGroups($uid, 'all', 1);

		$usersgroups = array();
		if (!empty($xgroups))
		{
			foreach ($xgroups as $group)
			{
				if ($group->regconfirmed)
				{
					$usersgroups[] = $group->cn;
				}
			}
		}

		// Get the groups of the profile
		$pgroups = self::getGroups($pid, 'all', 1);

		// Get the groups the user has access to
		$profilesgroups = array();
		if (!empty($pgroups))
		{
			foreach ($pgroups as $group)
			{
				if ($group->regconfirmed)
				{
					$profilesgroups[] = $group->cn;
				}
			}
		}

		// Find the common groups
		return array_intersect($usersgroups, $profilesgroups);
	}
1263937
private function getDataFromSubscription(Subscriber $subscriber)
    {
        $data = [
            'subscriber' => $subscriber->getData(),
        ];

        if ($subscriber->getConfirmationLink()) {
            $data['subscriber'] = $subscriber->getData();
        }
        if ($subscriber->getCustomerId()) {
            $customer = $this->customerFactory->create()->load($subscriber->getCustomerId());
            $data['customer'] = $customer->getData();
        }
        return $data;
    }
120520
def get_my_subscribed_topics(self, groupid):
        
        path = "/consumers/{group_id}/offsets".format(group_id=groupid)
        return self.get_children(path)
990538
def subscribers(options = {})
      load
      return [] if info['push'].nil? || info['push']['subscribers'].nil?

      info['push']['subscribers'].map { |s| Subscriber.new(s, self, options) }
    end