https://developer.zendesk.com/rest_api/docs/core/activity_stream#list-activities
432702
def activities_list(self, since=None, **kwargs):
        ""
        api_path = "/api/v2/activities.json"
        api_query = {}
        if "query" in kwargs.keys():
            api_query.update(kwargs["query"])
            del kwargs["query"]
        if since:
            api_query.update({
                "since": since,
            })
        return self.call(api_path, query=api_query, **kwargs)
317320
def file_list_projects(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/listProjects' % object_id, input_params, always_retry=always_retry, **kwargs)
48832
def get_lists_action(action)
      url = nil
      case action
      when "new_releases"
        url = "#{LISTS_DETAIL_BASE_URL}/dvds/new_releases.json?apikey=#{@api_key}"
      when "opening"
        url = "#{LISTS_DETAIL_BASE_URL}/movies/opening.json?apikey=#{@api_key}"
      when "upcoming"
        url = "#{LISTS_DETAIL_BASE_URL}/movies/upcoming.json?apikey=#{@api_key}"
      when "in_theaters"
        url = "#{LISTS_DETAIL_BASE_URL}/movies/in_theaters.json?apikey=#{@api_key}"
      when "current_releases"
        url = "#{LISTS_DETAIL_BASE_URL}/dvds/current_releases.json?apikey=#{@api_key}"
      when "upcoming_dvds"
        url = "#{LISTS_DETAIL_BASE_URL}/dvds/upcoming.json?apikey=#{@api_key}"
      when "top_rentals"
        url = "#{LISTS_DETAIL_BASE_URL}/dvds/top_rentals.json?apikey=#{@api_key}"
      else
        puts "Not a valid action"
        return
      end
      return get(url)
    end
352665
private void readActivities()
   {
      Map<String, ChildTaskContainer> parentMap = new HashMap<String, ChildTaskContainer>();
      for (MapRow row : m_tables.get("WBS"))
      {
         String activityID = row.getString("ACTIVITY_ID");
         m_wbsFormat.parseRawValue(row.getString("CODE_VALUE"));
         String parentWBS = m_wbsFormat.getFormattedValue();

         ChildTaskContainer parent = m_wbsMap.get(parentWBS);
         if (parent != null)
         {
            parentMap.put(activityID, parent);
         }
      }

      List<MapRow> items = new ArrayList<MapRow>();
      for (MapRow row : m_tables.get("ACT"))
      {
         items.add(row);
      }
      final AlphanumComparator comparator = new AlphanumComparator();
      Collections.sort(items, new Comparator<MapRow>()
      {
         @Override public int compare(MapRow o1, MapRow o2)
         {
            return comparator.compare(o1.getString("ACTIVITY_ID"), o2.getString("ACTIVITY_ID"));
         }
      });

      for (MapRow row : items)
      {
         String activityID = row.getString("ACTIVITY_ID");
         ChildTaskContainer parent = parentMap.get(activityID);
         if (parent == null)
         {
            parent = m_projectFile;
         }
         Task task = parent.addTask();
         setFields(TASK_FIELDS, row, task);
         task.setStart(task.getEarlyStart());
         task.setFinish(task.getEarlyFinish());
         task.setMilestone(task.getDuration().getDuration() == 0);
         if (parent instanceof Task)
         {
            task.setWBS(((Task) parent).getWBS());
         }

         int flag = row.getInteger("ACTUAL_START_OR_CONSTRAINT_FLAG").intValue();
         if (flag != 0)
         {
            Date date = row.getDate("AS_OR_ED_CONSTRAINT");
            switch (flag)
            {
               case 1:
               {
                  task.setConstraintType(ConstraintType.START_NO_EARLIER_THAN);
                  task.setConstraintDate(date);
                  break;
               }

               case 3:
               {
                  task.setConstraintType(ConstraintType.FINISH_NO_EARLIER_THAN);
                  task.setConstraintDate(date);
                  break;
               }

               case 99:
               {
                  task.setActualStart(date);
                  break;
               }
            }
         }

         flag = row.getInteger("ACTUAL_FINISH_OR_CONSTRAINT_FLAG").intValue();
         if (flag != 0)
         {
            Date date = row.getDate("AF_OR_LD_CONSTRAINT");
            switch (flag)
            {
               case 2:
               {
                  task.setConstraintType(ConstraintType.START_NO_LATER_THAN);
                  task.setConstraintDate(date);
                  break;
               }

               case 4:
               {
                  task.setConstraintType(ConstraintType.FINISH_NO_LATER_THAN);
                  task.setConstraintDate(date);
                  break;
               }

               case 99:
               {
                  task.setActualFinish(date);
                  break;
               }
            }
         }

         m_activityMap.put(activityID, task);
      }
   }
359348
def _fetch_activities(self):
        
        activities = []
        # Prepare url of the first page
        url = '{0}/organizations/{1}/activity/'.format(
            self.url, self.organization)
        while url:
            # Fetch one page of activities
            try:
                log.debug('Fetching activity data: {0}'.format(url))
                response = requests.get(url, headers=self.headers)
                if not response.ok:
                    log.error(response.text)
                    raise ReportError('Failed to fetch Sentry activities.')
                data = response.json()
                log.data("Response headers:\n{0}".format(
                    pretty(response.headers)))
                log.debug("Fetched {0}.".format(listed(len(data), 'activity')))
                log.data(pretty(data))
                for activity in [Activity(item) for item in data]:
                    # We've reached the last page, older records not relevant
                    if activity.created < self.stats.options.since.date:
                        return activities
                    # Store only relevant activites (before until date)
                    if activity.created < self.stats.options.until.date:
                        log.details("Activity: {0}".format(activity))
                        activities.append(activity)
            except requests.RequestException as error:
                log.debug(error)
                raise ReportError(
                    'Failed to fetch Sentry activities from {0}'.format(url))
            # Check for possible next page
            try:
                url = NEXT_PAGE.search(response.headers['Link']).groups()[0]
            except AttributeError:
                url = None
        return activities
653040
def stream_members(self, stream_id):
        '''  '''
        response, status_code = self.__pod__.Streams.get_v1_admin_stream_id_membership_list(
            sessionToken=self.__session__,
            id=stream_id
        ).result()
        self.logger.debug('%s: %s' % (status_code, response))
        return status_code, response
660716
def list_subscriptions(self, service):
        """"""
        data = {
            'service': service,
        }
        return self._perform_post_request(self.list_subscriptions_endpoint, data, self.token_header)
112052
def get_activities_by_search(self, activity_query, activitiesearch):
        """"""
        # Implemented from azosid template for -
        # osid.resource.ResourceSearchSession.get_resources_by_search_template
        if not self._can('search'):
            raise PermissionDenied()
        return self._provider_session.get_activities_by_search(activity_query, activitiesearch)
1353339
def get_activity(self):
        """"""
        method = 'GET'
        endpoint = '/rest/v1/{}/activity'.format(self.client.sauce_username)
        return self.client.request(method, endpoint)
132537
def room_members(self, stream_id):
        '''  '''
        req_hook = 'pod/v2/room/' + str(stream_id) + '/membership/list'
        req_args = None
        status_code, response = self.__rest__.GET_query(req_hook, req_args)
        self.logger.debug('%s: %s' % (status_code, response))
        return status_code, response
950401
@SuppressWarnings("unchecked")
	public void addActivityStream(final List<JSONObject> activities) {
		final JSONArray items = new JSONArray();
		for (JSONObject activity : activities) {
			items.add(activity);
		}
		this.json.put("items", items);
	}
729702
def _activity_or_list(value):
        
        result = value
        if value is not None and not isinstance(value, ActivityList):
            try:
                result = ActivityList([Activity(value)])
            except (TypeError, AttributeError):
                result = ActivityList(value)
        return result
672625
def resource_listing(cls, request) -> [(200, 'Ok', ResourceListingModel)]:
        ''''''
        apis = [api.get_swagger_fragment() for api in Api if not api.private]
        Respond(200, {
            'apiVersion': cls.api.version,
            'swaggerVersion': cls.api.swagger_version,
            'apis': apis
        })
1066240
public ListAppStreamsResponse listAppStreams(String app, String status) {
        ListAppStreamsRequest request = new ListAppStreamsRequest();
        request.setApp(app);
        request.setStatus(status);
        return listAppStreams(request);
    }
874262
public List<Task> getActiveTasks() {
        InputStream response = null;
        URI uri = new URIBase(getBaseUri()).path("_active_tasks").build();
        try {
            response = couchDbClient.get(uri);
            return getResponseList(response, couchDbClient.getGson(), DeserializationTypes.TASKS);
        } finally {
            close(response);
        }
    }
472590
def getActivityStream(user,scope,last_id=nil)
      method = 'getActivityStream'
      type = ActivityStream
      args = {:user=>user,:scope=>scope}
      args[:last_id] = last_id if last_id
      auth = user
      return_object type,method,args,auth
    end
540247
def applet_list_projects(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/listProjects' % object_id, input_params, always_retry=always_retry, **kwargs)