Skip to content

Commit

Permalink
Fix opts examples in sample code
Browse files Browse the repository at this point in the history
  • Loading branch information
jv-asana committed Dec 12, 2023
1 parent 8d2b931 commit 7cd503b
Show file tree
Hide file tree
Showing 69 changed files with 736 additions and 297 deletions.
5 changes: 2 additions & 3 deletions codegen/templates/code_sample.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
{{#vendorExtensions.x-codegen-hasRequiredParams}}{{#parameters}}{{#required}}
{{{paramName}}} = {{{example}}} # {{{dataType}}} | {{{description}}}
{{/required}}{{/parameters}}{{/vendorExtensions.x-codegen-hasRequiredParams}}{{#hasOptionalParams}}
opts = {
{{#parameters}}{{^required}}
'{{{paramName}}}': {{{example}}}{{#vendorExtensions.x-codegen-hasMoreOptional}},{{/vendorExtensions.x-codegen-hasMoreOptional}} # {{{dataType}}} | {{{description}}}{{/required}}{{/parameters}}
opts = { {{~#parameters}}{{^required}}
'{{{paramName}}}': {{{example}}},{{#vendorExtensions.x-codegen-hasMoreOptional}}{{/vendorExtensions.x-codegen-hasMoreOptional}} # {{{dataType}}} | {{{description}}}{{/required}}{{/parameters}}
}{{/hasOptionalParams}}{{/hasParams}}
{{/hasAuthMethods}}
{{^hasAuthMethods}}
Expand Down
14 changes: 11 additions & 3 deletions docs/AttachmentsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ api_client = asana.ApiClient(configuration)
# create an instance of the API class
attachments_api_instance = asana.AttachmentsApi(api_client)
opts = {
'resource_subtype': "external" # str | 'file': "file_example" # str | 'parent': "parent_example" # str | 'url': "url_example" # str | 'name': "name_example" # str | 'connect_to_app': True # bool | 'opt_fields': "connected_to_app,created_at,download_url,host,name,parent,parent.created_by,parent.name,parent.resource_subtype,permanent_url,resource_subtype,size,view_url" # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
'resource_subtype': "external", # str |
'file': "file_example", # str |
'parent': "parent_example", # str |
'url': "url_example", # str |
'name': "name_example", # str |
'connect_to_app': True, # bool |
'opt_fields': "connected_to_app,created_at,download_url,host,name,parent,parent.created_by,parent.name,parent.resource_subtype,permanent_url,resource_subtype,size,view_url", # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
}

try:
Expand Down Expand Up @@ -134,7 +140,7 @@ api_client = asana.ApiClient(configuration)
attachments_api_instance = asana.AttachmentsApi(api_client)
attachment_gid = "12345" # str | Globally unique identifier for the attachment.
opts = {
'opt_fields': "connected_to_app,created_at,download_url,host,name,parent,parent.created_by,parent.name,parent.resource_subtype,permanent_url,resource_subtype,size,view_url" # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
'opt_fields': "connected_to_app,created_at,download_url,host,name,parent,parent.created_by,parent.name,parent.resource_subtype,permanent_url,resource_subtype,size,view_url", # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
}

try:
Expand Down Expand Up @@ -185,7 +191,9 @@ api_client = asana.ApiClient(configuration)
attachments_api_instance = asana.AttachmentsApi(api_client)
parent = "159874" # str | Globally unique identifier for object to fetch statuses from. Must be a GID for a `project`, `project_brief`, or `task`.
opts = {
'limit': 50, # int | Results per page. The number of objects to return per page. The value must be between 1 and 100. 'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9", # 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.' 'opt_fields': "connected_to_app,created_at,download_url,host,name,offset,parent,parent.created_by,parent.name,parent.resource_subtype,path,permanent_url,resource_subtype,size,uri,view_url" # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
'limit': 50, # int | Results per page. The number of objects to return per page. The value must be between 1 and 100.
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9", # 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.'
'opt_fields': "connected_to_app,created_at,download_url,host,name,offset,parent,parent.created_by,parent.name,parent.resource_subtype,path,permanent_url,resource_subtype,size,uri,view_url", # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
}

try:
Expand Down
14 changes: 11 additions & 3 deletions docs/AttachmentsApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ AttachmentsApi:
# create an instance of the API class
attachments_api_instance = asana.AttachmentsApi(api_client)
opts = {
'resource_subtype': "external" # str | 'file': "file_example" # str | 'parent': "parent_example" # str | 'url': "url_example" # str | 'name': "name_example" # str | 'connect_to_app': True # bool | 'opt_fields': "connected_to_app,created_at,download_url,host,name,parent,parent.created_by,parent.name,parent.resource_subtype,permanent_url,resource_subtype,size,view_url" # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
'resource_subtype': "external", # str |
'file': "file_example", # str |
'parent': "parent_example", # str |
'url': "url_example", # str |
'name': "name_example", # str |
'connect_to_app': True, # bool |
'opt_fields': "connected_to_app,created_at,download_url,host,name,parent,parent.created_by,parent.name,parent.resource_subtype,permanent_url,resource_subtype,size,view_url", # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
}
try:
Expand Down Expand Up @@ -53,7 +59,7 @@ AttachmentsApi:
attachments_api_instance = asana.AttachmentsApi(api_client)
attachment_gid = "12345" # str | Globally unique identifier for the attachment.
opts = {
'opt_fields': "connected_to_app,created_at,download_url,host,name,parent,parent.created_by,parent.name,parent.resource_subtype,permanent_url,resource_subtype,size,view_url" # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
'opt_fields': "connected_to_app,created_at,download_url,host,name,parent,parent.created_by,parent.name,parent.resource_subtype,permanent_url,resource_subtype,size,view_url", # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
}
try:
Expand All @@ -75,7 +81,9 @@ AttachmentsApi:
attachments_api_instance = asana.AttachmentsApi(api_client)
parent = "159874" # str | Globally unique identifier for object to fetch statuses from. Must be a GID for a `project`, `project_brief`, or `task`.
opts = {
'limit': 50, # int | Results per page. The number of objects to return per page. The value must be between 1 and 100. 'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9", # 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.' 'opt_fields': "connected_to_app,created_at,download_url,host,name,offset,parent,parent.created_by,parent.name,parent.resource_subtype,path,permanent_url,resource_subtype,size,uri,view_url" # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
'limit': 50, # int | Results per page. The number of objects to return per page. The value must be between 1 and 100.
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9", # 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.'
'opt_fields': "connected_to_app,created_at,download_url,host,name,offset,parent,parent.created_by,parent.name,parent.resource_subtype,path,permanent_url,resource_subtype,size,uri,view_url", # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
}
try:
Expand Down
9 changes: 8 additions & 1 deletion docs/AuditLogAPIApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ api_client = asana.ApiClient(configuration)
audit_log_api_api_instance = asana.AuditLogAPIApi(api_client)
workspace_gid = "12345" # str | Globally unique identifier for the workspace or organization.
opts = {
'start_at': '2013-10-20T19:20:30+01:00', # datetime | Filter to events created after this time (inclusive). 'end_at': '2013-10-20T19:20:30+01:00', # datetime | Filter to events created before this time (exclusive). 'event_type': "event_type_example", # str | Filter to events of this type. Refer to the [supported audit log events](/docs/audit-log-events#supported-audit-log-events) for a full list of values. 'actor_type': "actor_type_example", # 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. 'actor_gid': "actor_gid_example", # str | Filter to events triggered by the actor with this ID. 'resource_gid': "resource_gid_example", # str | Filter to events with this resource ID. 'limit': 50, # int | Results per page. The number of objects to return per page. The value must be between 1 and 100. 'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9" # 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.'
'start_at': '2013-10-20T19:20:30+01:00', # datetime | Filter to events created after this time (inclusive).
'end_at': '2013-10-20T19:20:30+01:00', # datetime | Filter to events created before this time (exclusive).
'event_type': "event_type_example", # str | Filter to events of this type. Refer to the [supported audit log events](/docs/audit-log-events#supported-audit-log-events) for a full list of values.
'actor_type': "actor_type_example", # 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.
'actor_gid': "actor_gid_example", # str | Filter to events triggered by the actor with this ID.
'resource_gid': "resource_gid_example", # str | Filter to events with this resource ID.
'limit': 50, # int | Results per page. The number of objects to return per page. The value must be between 1 and 100.
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9", # 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.'
}

try:
Expand Down
9 changes: 8 additions & 1 deletion docs/AuditLogAPIApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ AuditLogAPIApi:
audit_log_api_api_instance = asana.AuditLogAPIApi(api_client)
workspace_gid = "12345" # str | Globally unique identifier for the workspace or organization.
opts = {
'start_at': '2013-10-20T19:20:30+01:00', # datetime | Filter to events created after this time (inclusive). 'end_at': '2013-10-20T19:20:30+01:00', # datetime | Filter to events created before this time (exclusive). 'event_type': "event_type_example", # str | Filter to events of this type. Refer to the [supported audit log events](/docs/audit-log-events#supported-audit-log-events) for a full list of values. 'actor_type': "actor_type_example", # 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. 'actor_gid': "actor_gid_example", # str | Filter to events triggered by the actor with this ID. 'resource_gid': "resource_gid_example", # str | Filter to events with this resource ID. 'limit': 50, # int | Results per page. The number of objects to return per page. The value must be between 1 and 100. 'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9" # 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.'
'start_at': '2013-10-20T19:20:30+01:00', # datetime | Filter to events created after this time (inclusive).
'end_at': '2013-10-20T19:20:30+01:00', # datetime | Filter to events created before this time (exclusive).
'event_type': "event_type_example", # str | Filter to events of this type. Refer to the [supported audit log events](/docs/audit-log-events#supported-audit-log-events) for a full list of values.
'actor_type': "actor_type_example", # 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.
'actor_gid': "actor_gid_example", # str | Filter to events triggered by the actor with this ID.
'resource_gid': "resource_gid_example", # str | Filter to events with this resource ID.
'limit': 50, # int | Results per page. The number of objects to return per page. The value must be between 1 and 100.
'offset': "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9", # 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.'
}
try:
Expand Down
2 changes: 1 addition & 1 deletion docs/BatchAPIApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ api_client = asana.ApiClient(configuration)
batch_api_api_instance = asana.BatchAPIApi(api_client)
body = {"data": {"param1": "value1", "param2": "value2",}} # dict | The requests to batch together via the Batch API.
opts = {
'opt_fields': "body,headers,status_code" # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
'opt_fields': "body,headers,status_code", # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
}

try:
Expand Down
2 changes: 1 addition & 1 deletion docs/BatchAPIApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BatchAPIApi:
batch_api_api_instance = asana.BatchAPIApi(api_client)
body = {"data": {"param1": "value1", "param2": "value2",}} # dict | The requests to batch together via the Batch API.
opts = {
'opt_fields': "body,headers,status_code" # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
'opt_fields': "body,headers,status_code", # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
}
try:
Expand Down
Loading

0 comments on commit 7cd503b

Please sign in to comment.