Skip to content

Commit 7cf589f

Browse files
authored
Merge pull request #119 from Asana/openapi-sync
Generated from OpenAPI
2 parents b40a67e + eae6f7b commit 7cf589f

File tree

4 files changed

+50
-2
lines changed

4 files changed

+50
-2
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.10.8
1+
0.10.9
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
### WARNING: This file is auto-generated by our OpenAPI spec. Do not
2+
### edit it manually.
3+
4+
require_relative '../../resource_includes/response_helper'
5+
6+
module Asana
7+
module Resources
8+
class AuditLogAPIBase < Resource
9+
10+
def self.inherited(base)
11+
Registry.register(base)
12+
end
13+
14+
class << self
15+
# Get audit log events
16+
#
17+
# workspace_gid - [str] (required) Globally unique identifier for the workspace or organization.
18+
# start_at - [datetime] Filter to events created after this time (inclusive).
19+
# end_at - [datetime] Filter to events created before this time (exclusive).
20+
# event_type - [str] Filter to events of this type. Refer to the [Supported AuditLogEvents](/docs/supported-auditlogevents) for a full list of values.
21+
# actor_type - [str] Filter to events with an actor of this type. This only needs to be included if querying for actor types without an ID. If `actor_gid` is included, this should be excluded.
22+
# actor_gid - [str] Filter to events triggered by the actor with this ID.
23+
# resource_gid - [str] Filter to events with this resource ID.
24+
# options - [Hash] the request I/O options
25+
# > offset - [str] Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'
26+
# > limit - [int] Results per page. The number of objects to return per page. The value must be between 1 and 100.
27+
def get_audit_log_events(client, workspace_gid: required("workspace_gid"), start_at: nil, end_at: nil, event_type: nil, actor_type: nil, actor_gid: nil, resource_gid: nil, options: {})
28+
path = "/workspaces/{workspace_gid}/audit_log_events"
29+
path["{workspace_gid}"] = workspace_gid
30+
params = { start_at: start_at, end_at: end_at, event_type: event_type, actor_type: actor_type, actor_gid: actor_gid, resource_gid: resource_gid }.reject { |_,v| v.nil? || Array(v).empty? }
31+
Collection.new(parse(client.get(path, params: params, options: options)), type: Resource, client: client)
32+
end
33+
34+
end
35+
end
36+
end
37+
end

lib/asana/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#:nodoc:
22
module Asana
33
# Public: Version of the gem.
4-
VERSION = '0.10.8'
4+
VERSION = '0.10.9'
55
end

samples/audit_log_api_sample.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
auditlogapi:
2+
get_audit_log_events: >-
3+
require 'asana'
4+
5+
6+
client = Asana::Client.new do |c|
7+
c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'
8+
end
9+
10+
11+
result = client.audit_log_api.get_audit_log_events(workspace_gid: 'workspace_gid', param: "value", param: "value", options: {pretty: true})

0 commit comments

Comments
 (0)