Class: MicrosoftGraph::Me::Activities::Recent::RecentRequestBuilder::RecentRequestBuilderGetQueryParameters

Inherits:
Object
  • Object
show all
Defined in:
lib/me/activities/recent/recent_request_builder.rb

Overview

Get recent activities for a given user. This OData function has some default behaviors included to make it operate like a ‘most recently used’ API. The service will query for the most recent historyItems, and then pull those related activities. Activities will be sorted according to the most recent lastModified on the historyItem. This means that activities without historyItems will not be included in the response. The UserActivity.ReadWrite.CreatedByApp permission will also apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is particularly active and other applications have created more recent activities. To get your application’s activities, use the nextLink property to paginate.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#countObject

Include count of items



64
65
66
# File 'lib/me/activities/recent/recent_request_builder.rb', line 64

def count
  @count
end

#filterObject

Filter items by property values



67
68
69
# File 'lib/me/activities/recent/recent_request_builder.rb', line 67

def filter
  @filter
end

#orderbyObject

Order items by property values



70
71
72
# File 'lib/me/activities/recent/recent_request_builder.rb', line 70

def orderby
  @orderby
end

#searchObject

Search items by search phrases



73
74
75
# File 'lib/me/activities/recent/recent_request_builder.rb', line 73

def search
  @search
end

#selectObject

Select properties to be returned



76
77
78
# File 'lib/me/activities/recent/recent_request_builder.rb', line 76

def select
  @select
end

#skipObject

Skip the first n items



79
80
81
# File 'lib/me/activities/recent/recent_request_builder.rb', line 79

def skip
  @skip
end

#topObject

Show only the first n items



82
83
84
# File 'lib/me/activities/recent/recent_request_builder.rb', line 82

def top
  @top
end

Instance Method Details

#get_query_parameter(original_name) ⇒ Object

Maps the query parameters names to their encoded names for the URI template parsing.

Parameters:

  • original_name

    The original query parameter name in the class.

Returns:

  • a string

Raises:

  • (StandardError)


88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/me/activities/recent/recent_request_builder.rb', line 88

def get_query_parameter(original_name)
    raise StandardError, 'original_name cannot be null' if original_name.nil?
    case original_name
        when "count"
            return "%24count"
        when "filter"
            return "%24filter"
        when "orderby"
            return "%24orderby"
        when "search"
            return "%24search"
        when "select"
            return "%24select"
        when "skip"
            return "%24skip"
        when "top"
            return "%24top"
        else
            return original_name
    end
end