Skip to content

Commit 8188c88

Browse files
authored
Merge pull request #13 from klaviyo/20230301-weekly
added page_size
2 parents 4e3296a + a9895b3 commit 8188c88

201 files changed

Lines changed: 75 additions & 51463 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
NOTE: For more granular API-specific changes, please see our [API Changelog](https://developers.klaviyo.com/en/docs/changelog_)
44

5+
## 1.3.0
6+
7+
### Added
8+
- `page_size`: you can now set page_size when paging through endpoints that return profiles
9+
510
## 1.2.1
611

712
### Bug Fixes

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Klaviyo Python SDK
22

3-
- SDK version: 1.2.1
3+
- SDK version: 1.3.0
44
- API revision: 2023-02-22
55

66
## Helpful Resources
@@ -177,7 +177,7 @@ klaviyo.Campaigns.create_campaign_clone(body)
177177

178178

179179

180-
#### [Create Campaign Message Assign Template](https://developers.klaviyo.com/en/v2023-02-22/reference/create_campaign_message_assign_template)
180+
#### [Assign Campaign Message Template](https://developers.klaviyo.com/en/v2023-02-22/reference/create_campaign_message_assign_template)
181181

182182
```python
183183
## Positional Arguments
@@ -1743,8 +1743,9 @@ klaviyo.Lists.get_list(id, fields_list=fields_list)
17431743
# fields_profile | [str]
17441744
# filter | str
17451745
# page_cursor | str
1746+
# page_size | int
17461747

1747-
klaviyo.Lists.get_list_profiles(list_id, fields_profile=fields_profile, filter=filter, page_cursor=page_cursor)
1748+
klaviyo.Lists.get_list_profiles(list_id, fields_profile=fields_profile, filter=filter, page_cursor=page_cursor, page_size=page_size)
17481749
```
17491750

17501751

@@ -1960,8 +1961,9 @@ klaviyo.Profiles.get_profile_segments(profile_id, fields_segment=fields_segment)
19601961
# filter | str
19611962
# page_cursor | str
19621963
# sort | str
1964+
# page_size | int
19631965

1964-
klaviyo.Profiles.get_profiles(fields_profile=fields_profile, filter=filter, page_cursor=page_cursor, sort=sort)
1966+
klaviyo.Profiles.get_profiles(fields_profile=fields_profile, filter=filter, page_cursor=page_cursor, sort=sort, page_size=page_size)
19651967
```
19661968

19671969

@@ -2066,8 +2068,9 @@ klaviyo.Segments.get_segment(id, fields_segment=fields_segment)
20662068
# fields_profile | [str]
20672069
# filter | str
20682070
# page_cursor | str
2071+
# page_size | int
20692072

2070-
klaviyo.Segments.get_segment_profiles(segment_id, fields_profile=fields_profile, filter=filter, page_cursor=page_cursor)
2073+
klaviyo.Segments.get_segment_profiles(segment_id, fields_profile=fields_profile, filter=filter, page_cursor=page_cursor, page_size=page_size)
20712074
```
20722075

20732076

openapi_client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"""
1212

1313

14-
__version__ = "1.2.1"
14+
__version__ = "1.3.0"
1515

1616
# import ApiClient
1717
from openapi_client.api_client import ApiClient

openapi_client/api/campaigns_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,7 @@ def create_campaign_message_assign_template(
13281328
campaign_message_assign_template_query,
13291329
**kwargs
13301330
):
1331-
"""Create Campaign Message Assign Template # noqa: E501
1331+
"""Assign Campaign Message Template # noqa: E501
13321332
13331333
Creates a non-reusable version of the template and assigns it to the message.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `Campaigns Write` # noqa: E501
13341334
This method makes a synchronous HTTP request by default. To make an

openapi_client/api/catalogs_api.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4324,7 +4324,7 @@ def delete_catalog_category(
43244324
>>> result = thread.get()
43254325
43264326
Args:
4327-
id (str): The catalog category ID is a compound ID (string), with format: `${integration}:::${catalog}:::${external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
4327+
id (str): The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
43284328
43294329
Keyword Args:
43304330
_return_http_data_only (bool): response data without head status
@@ -4498,7 +4498,7 @@ def delete_catalog_item(
44984498
>>> result = thread.get()
44994499
45004500
Args:
4501-
id (str): The catalog item ID is a compound ID (string), with format: `${integration}:::${catalog}:::${external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
4501+
id (str): The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
45024502
45034503
Keyword Args:
45044504
_return_http_data_only (bool): response data without head status
@@ -4672,7 +4672,7 @@ def delete_catalog_variant(
46724672
>>> result = thread.get()
46734673
46744674
Args:
4675-
id (str): The catalog variant ID is a compound ID (string), with format: `${integration}:::${catalog}:::${external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
4675+
id (str): The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
46764676
46774677
Keyword Args:
46784678
_return_http_data_only (bool): response data without head status
@@ -4837,7 +4837,7 @@ def get_catalog_category(
48374837
>>> result = thread.get()
48384838
48394839
Args:
4840-
id (str): The catalog category ID is a compound ID (string), with format: `${integration}:::${catalog}:::${external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
4840+
id (str): The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
48414841
48424842
Keyword Args:
48434843
fields_catalog_category ([str]): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets. [optional]
@@ -4921,7 +4921,7 @@ def get_catalog_category_items(
49214921
>>> result = thread.get()
49224922
49234923
Args:
4924-
category_id (str): The catalog category ID is a compound ID (string), with format: `${integration}:::${catalog}:::${external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
4924+
category_id (str): The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
49254925
49264926
Keyword Args:
49274927
fields_catalog_item ([str]): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets. [optional]
@@ -5098,7 +5098,7 @@ def get_catalog_item(
50985098
>>> result = thread.get()
50995099
51005100
Args:
5101-
id (str): The catalog item ID is a compound ID (string), with format: `${integration}:::${catalog}:::${external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
5101+
id (str): The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
51025102
51035103
Keyword Args:
51045104
fields_catalog_item ([str]): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets. [optional]
@@ -5184,7 +5184,7 @@ def get_catalog_item_categories(
51845184
>>> result = thread.get()
51855185
51865186
Args:
5187-
item_id (str): The catalog item ID is a compound ID (string), with format: `${integration}:::${catalog}:::${external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
5187+
item_id (str): The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
51885188
51895189
Keyword Args:
51905190
fields_catalog_category ([str]): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets. [optional]
@@ -5359,7 +5359,7 @@ def get_catalog_item_variants(
53595359
>>> result = thread.get()
53605360
53615361
Args:
5362-
item_id (str): The catalog item ID is a compound ID (string), with format: `${integration}:::${catalog}:::${external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
5362+
item_id (str): The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
53635363
53645364
Keyword Args:
53655365
fields_catalog_variant ([str]): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets. [optional]
@@ -5530,7 +5530,7 @@ def get_catalog_variant(
55305530
>>> result = thread.get()
55315531
55325532
Args:
5533-
id (str): The catalog variant ID is a compound ID (string), with format: `${integration}:::${catalog}:::${external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
5533+
id (str): The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
55345534
55355535
Keyword Args:
55365536
fields_catalog_variant ([str]): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets. [optional]
@@ -7941,7 +7941,7 @@ def update_catalog_category(
79417941
>>> result = thread.get()
79427942
79437943
Args:
7944-
id (str): The catalog category ID is a compound ID (string), with format: `${integration}:::${catalog}:::${external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
7944+
id (str): The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
79457945
catalog_category_update_query (CatalogCategoryUpdateQuery):
79467946
79477947
Keyword Args:
@@ -8119,7 +8119,7 @@ def update_catalog_item(
81198119
>>> result = thread.get()
81208120
81218121
Args:
8122-
id (str): The catalog item ID is a compound ID (string), with format: `${integration}:::${catalog}:::${external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
8122+
id (str): The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
81238123
catalog_item_update_query (CatalogItemUpdateQuery):
81248124
81258125
Keyword Args:
@@ -8297,7 +8297,7 @@ def update_catalog_variant(
82978297
>>> result = thread.get()
82988298
82998299
Args:
8300-
id (str): The catalog variant ID is a compound ID (string), with format: `${integration}:::${catalog}:::${external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
8300+
id (str): The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
83018301
catalog_variant_update_query (CatalogVariantUpdateQuery):
83028302
83038303
Keyword Args:

openapi_client/api/flows_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2208,7 +2208,7 @@ def update_flow(
22082208
>>> result = thread.get()
22092209
22102210
Args:
2211-
id (str):
2211+
id (str): ID of the Flow to update. Ex: XVTP5Q
22122212
flow_update_query (FlowUpdateQuery):
22132213
22142214
Keyword Args:

openapi_client/api/lists_api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ def __init__(self, api_client=None):
364364
'fields_profile',
365365
'filter',
366366
'page_cursor',
367+
'page_size',
367368
],
368369
'required': [
369370
'list_id',
@@ -416,18 +417,22 @@ def __init__(self, api_client=None):
416417
(str,),
417418
'page_cursor':
418419
(str,),
420+
'page_size':
421+
(int,),
419422
},
420423
'attribute_map': {
421424
'list_id': 'list_id',
422425
'fields_profile': 'fields[profile]',
423426
'filter': 'filter',
424427
'page_cursor': 'page[cursor]',
428+
'page_size': 'page[size]',
425429
},
426430
'location_map': {
427431
'list_id': 'path',
428432
'fields_profile': 'query',
429433
'filter': 'query',
430434
'page_cursor': 'query',
435+
'page_size': 'query',
431436
},
432437
'collection_format_map': {
433438
'fields_profile': 'csv',
@@ -1150,6 +1155,7 @@ def get_list_profiles(
11501155
fields_profile ([str]): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets. [optional]
11511156
filter (str): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals`. [optional]
11521157
page_cursor (str): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination. [optional]
1158+
page_size (int): [optional]
11531159
_return_http_data_only (bool): response data without head status
11541160
code and headers. Default is True.
11551161
_preload_content (bool): if False, the urllib3.HTTPResponse object

openapi_client/api/profiles_api.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ def __init__(self, api_client=None):
424424
'filter',
425425
'page_cursor',
426426
'sort',
427+
'page_size',
427428
],
428429
'required': [],
429430
'nullable': [
@@ -472,7 +473,9 @@ def __init__(self, api_client=None):
472473
"EMAIL": "email",
473474
"-EMAIL": "-email",
474475
"ID": "id",
475-
"-ID": "-id"
476+
"-ID": "-id",
477+
"UPDATED": "updated",
478+
"-UPDATED": "-updated"
476479
},
477480
},
478481
'openapi_types': {
@@ -484,18 +487,22 @@ def __init__(self, api_client=None):
484487
(str,),
485488
'sort':
486489
(str,),
490+
'page_size':
491+
(int,),
487492
},
488493
'attribute_map': {
489494
'fields_profile': 'fields[profile]',
490495
'filter': 'filter',
491496
'page_cursor': 'page[cursor]',
492497
'sort': 'sort',
498+
'page_size': 'page[size]',
493499
},
494500
'location_map': {
495501
'fields_profile': 'query',
496502
'filter': 'query',
497503
'page_cursor': 'query',
498504
'sort': 'query',
505+
'page_size': 'query',
499506
},
500507
'collection_format_map': {
501508
'fields_profile': 'csv',
@@ -1207,7 +1214,7 @@ def get_profiles(
12071214
):
12081215
"""Get Profiles # noqa: E501
12091216
1210-
Get all profiles in an account. Profiles can be sorted by the following fields in ascending and descending order: `id`, `created`, `email` You can adjust the number of results per page via the `page[size]` query parameter, e.g. `?page[size]=25`. **Default**: 20. **Max**: 100.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Profiles Read` # noqa: E501
1217+
Get all profiles in an account. Profiles can be sorted by the following fields in ascending and descending order: `id`, `created`, `updated`, `email` You can adjust the number of results per page via the `page[size]` query parameter, e.g. `?page[size]=25`. **Default**: 20. **Max**: 100.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Profiles Read` # noqa: E501
12111218
This method makes a synchronous HTTP request by default. To make an
12121219
asynchronous HTTP request, please pass async_req=True
12131220
@@ -1217,9 +1224,10 @@ def get_profiles(
12171224
12181225
Keyword Args:
12191226
fields_profile ([str]): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets. [optional]
1220-
filter (str): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`external_id`: `any`, `equals`<br>`anonymous_id`: `any`, `equals`<br>`_kx`: `equals`<br>`created`: `greater-than`, `less-than`. [optional]
1227+
filter (str): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`external_id`: `any`, `equals`<br>`anonymous_id`: `any`, `equals`<br>`_kx`: `equals`<br>`created`: `greater-than`, `less-than`<br>`updated`: `greater-than`, `less-than`. [optional]
12211228
page_cursor (str): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination. [optional]
12221229
sort (str): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting. [optional]
1230+
page_size (int): [optional]
12231231
_return_http_data_only (bool): response data without head status
12241232
code and headers. Default is True.
12251233
_preload_content (bool): if False, the urllib3.HTTPResponse object

openapi_client/api/segments_api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def __init__(self, api_client=None):
118118
'fields_profile',
119119
'filter',
120120
'page_cursor',
121+
'page_size',
121122
],
122123
'required': [
123124
'segment_id',
@@ -170,18 +171,22 @@ def __init__(self, api_client=None):
170171
(str,),
171172
'page_cursor':
172173
(str,),
174+
'page_size':
175+
(int,),
173176
},
174177
'attribute_map': {
175178
'segment_id': 'segment_id',
176179
'fields_profile': 'fields[profile]',
177180
'filter': 'filter',
178181
'page_cursor': 'page[cursor]',
182+
'page_size': 'page[size]',
179183
},
180184
'location_map': {
181185
'segment_id': 'path',
182186
'fields_profile': 'query',
183187
'filter': 'query',
184188
'page_cursor': 'query',
189+
'page_size': 'query',
185190
},
186191
'collection_format_map': {
187192
'fields_profile': 'csv',
@@ -556,6 +561,7 @@ def get_segment_profiles(
556561
fields_profile ([str]): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets. [optional]
557562
filter (str): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals`. [optional]
558563
page_cursor (str): For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination. [optional]
564+
page_size (int): [optional]
559565
_return_http_data_only (bool): response data without head status
560566
code and headers. Default is True.
561567
_preload_content (bool): if False, the urllib3.HTTPResponse object

0 commit comments

Comments
 (0)