Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**field** | **str** | Required. Name of the field to use as the first operand in the filter expression. | [optional]
**key** | **str** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional]
**value** | **str** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional]
**value** | **str** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. For `in_array` and `not_in_array` relations, provide a comma-separated list of up to 20 values. | [optional]
**hours_ago** | **str** | If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. | [optional]
**radius** | **float** | If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. | [optional]
**lat** | **float** | If `field` is `location`, this is *required* to specify the user's latitude. | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/FilterExpression.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**field** | **str** | Required. Name of the field to use as the first operand in the filter expression. | [optional]
**key** | **str** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional]
**value** | **str** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional]
**value** | **str** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. For `in_array` and `not_in_array` relations, provide a comma-separated list of up to 20 values. | [optional]
**hours_ago** | **str** | If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. | [optional]
**radius** | **float** | If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. | [optional]
**lat** | **float** | If `field` is `location`, this is *required* to specify the user's latitude. | [optional]
Expand Down
6 changes: 4 additions & 2 deletions onesignal/model/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class Filter(ModelNormal):
'NOT_EXISTS': "not_exists",
'TIME_ELAPSED_GT': "time_elapsed_gt",
'TIME_ELAPSED_LT': "time_elapsed_lt",
'IN_ARRAY': "in_array",
'NOT_IN_ARRAY': "not_in_array",
},
}

Expand Down Expand Up @@ -161,7 +163,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
_visited_composed_classes = (Animal,)
field (str): Required. Name of the field to use as the first operand in the filter expression.. [optional] # noqa: E501
key (str): If `field` is `tag`, this field is *required* to specify `key` inside the tags.. [optional] # noqa: E501
value (str): Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator.. [optional] # noqa: E501
value (str): Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. For `in_array` and `not_in_array` relations, provide a comma-separated list of up to 20 values.. [optional] # noqa: E501
hours_ago (str): If `field` is session-related, this is *required* to specify the number of hours before or after the user's session.. [optional] # noqa: E501
radius (float): If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`.. [optional] # noqa: E501
lat (float): If `field` is `location`, this is *required* to specify the user's latitude.. [optional] # noqa: E501
Expand Down Expand Up @@ -254,7 +256,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
_visited_composed_classes = (Animal,)
field (str): Required. Name of the field to use as the first operand in the filter expression.. [optional] # noqa: E501
key (str): If `field` is `tag`, this field is *required* to specify `key` inside the tags.. [optional] # noqa: E501
value (str): Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator.. [optional] # noqa: E501
value (str): Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. For `in_array` and `not_in_array` relations, provide a comma-separated list of up to 20 values.. [optional] # noqa: E501
hours_ago (str): If `field` is session-related, this is *required* to specify the number of hours before or after the user's session.. [optional] # noqa: E501
radius (float): If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`.. [optional] # noqa: E501
lat (float): If `field` is `location`, this is *required* to specify the user's latitude.. [optional] # noqa: E501
Expand Down
6 changes: 4 additions & 2 deletions onesignal/model/filter_expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ class FilterExpression(ModelComposed):
'NOT_EXISTS': "not_exists",
'TIME_ELAPSED_GT': "time_elapsed_gt",
'TIME_ELAPSED_LT': "time_elapsed_lt",
'IN_ARRAY': "in_array",
'NOT_IN_ARRAY': "not_in_array",
},
('operator',): {
'OR': "OR",
Expand Down Expand Up @@ -173,7 +175,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
_visited_composed_classes = (Animal,)
field (str): Required. Name of the field to use as the first operand in the filter expression.. [optional] # noqa: E501
key (str): If `field` is `tag`, this field is *required* to specify `key` inside the tags.. [optional] # noqa: E501
value (str): Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator.. [optional] # noqa: E501
value (str): Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. For `in_array` and `not_in_array` relations, provide a comma-separated list of up to 20 values.. [optional] # noqa: E501
hours_ago (str): If `field` is session-related, this is *required* to specify the number of hours before or after the user's session.. [optional] # noqa: E501
radius (float): If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`.. [optional] # noqa: E501
lat (float): If `field` is `location`, this is *required* to specify the user's latitude.. [optional] # noqa: E501
Expand Down Expand Up @@ -285,7 +287,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
_visited_composed_classes = (Animal,)
field (str): Required. Name of the field to use as the first operand in the filter expression.. [optional] # noqa: E501
key (str): If `field` is `tag`, this field is *required* to specify `key` inside the tags.. [optional] # noqa: E501
value (str): Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator.. [optional] # noqa: E501
value (str): Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. For `in_array` and `not_in_array` relations, provide a comma-separated list of up to 20 values.. [optional] # noqa: E501
hours_ago (str): If `field` is session-related, this is *required* to specify the number of hours before or after the user's session.. [optional] # noqa: E501
radius (float): If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`.. [optional] # noqa: E501
lat (float): If `field` is `location`, this is *required* to specify the user's latitude.. [optional] # noqa: E501
Expand Down