<!-- Source: https://docs.squirro.com/en/latest/api/squirro_client.topic.ObjectsMixin.html -->
# ObjectsMixin

**`class ObjectsMixin`**

Bases: [`object`](https://docs.python.org/3.11/library/functions.html#object)

Methods SummaryMethods Documentation

**`delete_object(project_id, object_id)`**

DEPRECATED: objects no longer exist.

Delete a object.

Parameters

- `project_id` – Project identifier.
- `object_id` – Object identifier.

Example:

```
>>> client.delete_object('2aEVClLRRA-vCCIvnuEAvQ',
...                      '2TBYtWgRRIa23h1rEveI3g')
```

**`get_object(project_id, object_id)`**

DEPRECATED: objects no longer exist.

Get object details.

Parameters

- `project_id` – Project identifier.
- `object_id` – Object identifier.

Returns

A dictionary which contains the object.

Example:

```
>>> client.get_object('2aEVClLRRA-vCCIvnuEAvQ',
...                   '2sic33jZTi-ifflvQAVcfw')
{u'project_id': u'2aEVClLRRA-vCCIvnuEAvQ',
 u'id': u'2sic33jZTi-ifflvQAVcfw',
 u'is_ready': True,
 u'managed_subscription': False,
 u'needs_preview': False,
 u'noise_level': None,
 u'subscriptions': [u'3qTRv4W9RvuOxcGwnnAYbg',
                    u'hw8j7LUBRM28-jAellgQdA',
                    u'4qBkea4bTv-QagNS76_akA',
                    u'NyfRri_2SUa_JNptx0JAnQ',
                    u'oTvI6rlaRmKvmYCfCvLwpw',
                    u'c3aEwdz5TMefc_u7hCl4PA',
                    u'Xc0MN_7KTAuDOUbO4mhG6A',
                    u'y1Ur-vLuRmmzUNMi4xGrJw',
                    u'iTdms4wgTRapn1ehMqJgwA',
                    u'MawimNPKSlmpeS9YlMzzaw'],
 u'subscriptions_processed': True,
 u'title': u'Squirro',
 u'type': u'organization'}
```

**`get_object_signals(project_id, object_id, flat=False)`**

DEPRECATED: objects no longer exist.

Return a dictionary of object signals for a object.

Parameters

- `project_id` – Project identifier.
- `object_id` – Object identifier.
- `flat` – Set to True to receive a simpler dictionary
  representation. The seeder information is not displayed in that
  case.

Returns

Dictionary of signals on this object.

Example:

```
>>> client.get_object_signals(
...     'gd9eIipOQ-KobU0SwJ8VcQ', '2sic33jZTi-ifflvQAVcfw')
{'signals': [{u'key': u'email_domain',
              u'value': 'nestle.com',
              u'seeder': 'salesforce'}]}

>>> client.get_object_signals(
...     'gd9eIipOQ-KobU0SwJ8VcQ', '2sic33jZTi-ifflvQAVcfw',
...     flat=True)
{u'email_domain': 'nestle.com'}
```

**`get_user_objects(project_id, full=None, start=None, count=None, api_version='v0')`**

DEPRECATED: objects no longer exist.

Get all objects for the provided user.

Parameters

- `project_id` – Project identifier from which the objects should be
  returned.
- `full` – If set to True, then include subscription and source
  details in the response.
- `start` – Integer. Used for pagination of objects. If set, the
  objects starting with offset start are returned. Defaults to 0.
- `count` – Integer. Used for pagination of objects. If set, count
  objects are returned. Defaults to 100.
- `api_version` – API version to use. Pagination (start and count
  needs API version v1).

Returns

A list which contains the objects.

Example:

```
>>> client.get_user_objects(project_id='Sz7LLLbyTzy_SddblwIxaA',
                            api_version='v1')
{u'count': 100,
 u'start': 0,
 u'next_params': {u'count': 100, u'start': 100}
 u'objects':[{u'project_id': u'Sz7LLLbyTzy_SddblwIxaA',
  u'id': u'zFe3V-3hQlSjPtkIKpjkXg',
  u'is_ready': True,
  u'needs_preview': False,
  u'noise_level': None,
  u'title': u'A',
  u'type': u'contact'}]}
```

**`modify_object(project_id, object_id, title=None, is_ready=None)`**

DEPRECATED: objects no longer exist.

Modify an object.

Parameters

- `project_id` – Project identifier for the object.
- `object_id` – Object identifier.
- `title` – New object title.
- `is_ready` – New object is_ready flag, either True for False.

Example:

```
>>> client.modify_object('2aEVClLRRA-vCCIvnuEAvQ',
...                      '2TBYtWgRRIa23h1rEveI3g', is_ready=False)
```

**`new_object(project_id, title, owner_id=None, type=None, is_ready=None)`**

DEPRECATED: objects no longer exist.

Create a new object.

Parameters

- `project_id` – Project identifier.
- `title` – Object title.
- `owner_id` – User identifier which owns the objects.
- `type` – Object type.
- `is_ready` – Object is_ready flag, either True or False.

Returns

A dictionary which contains the project identifier and the
new object identifier.

Example:

```
>>> client.new_object(
...     'H5Qv-WhgSBGW0WL8xolSCQ', '2aEVClLRRA-vCCIvnuEAvQ',
...     'Memonic', type='organization')
{u'project_id': u'2aEVClLRRA-vCCIvnuEAvQ',
 u'id': u'2TBYtWgRRIa23h1rEveI3g'}
```

**`pause_object(project_id, object_id, subscription_ids=None)`**

DEPRECATED: objects no longer exist.

Pause all (or some) subscriptions of an object.

Parameters

- `project_id` – Project identifier.
- `object_id` – Object identifier.
- `subscription_ids` – Optional, list of subscription identifiers.
  Only pause these subscriptions of the object.

Example:

```
>>> client.pause_object('2aEVClLRRA-vCCIvnuEAvQ',
...                     '2TBYtWgRRIa23h1rEveI3g')
```

**`resume_object(project_id, object_id, subscription_ids=None)`**

DEPRECATED: objects no longer exist.

Resume all (or some) paused subscriptions of an object.

Parameters

- `project_id` – Project identifier.
- `object_id` – Object identifier.
- `subscription_ids` – Optional, list of subscription identifiers.
  Only resume these subscriptions of the object.

Example:

```
>>> client.resume_object('2aEVClLRRA-vCCIvnuEAvQ',
...                      '2TBYtWgRRIa23h1rEveI3g')
```

**`update_object_signals(project_id, object_id, signals, seeder=None, flat=False)`**

DEPRECATED: objects no longer exist.

Updates the object signals of a object.

Parameters

- `project_id` – Project identifier.
- `object_id` – Object identifier.
- `signals` – List of all objects to update. Only signals that exist
  in this list will be touched, the others are left intact. Use the
  value None for a key to delete that signal.
- `seeder` – Seeder that owns these signals. Should be set for
  automatically written values.
- `flat` – Set to True to pass in and receive a simpler dictionary
  representation. The seeder information is not displayed in that
  case.

Returns

List or dictionary of all signals of that object in the same
format as returned by get_object_signals.

Example:

```
>>> client.update_object_signals(
...     'gd9eIipOQ-KobU0SwJ8VcQ', '2sic33jZTi-ifflvQAVcfw',
...     [{'key': 'essentials', 'value': [
...       'discovery-baseobject-A96PWkLzTIWSJy3WMsvzzw']}])
[
    {u'key': u'essentials',
     u'value': [u'discovery-baseobject-A96PWkLzTIWSJy3WMsvzzw'],
     u'seeder': None},
    {u'key': u'email_domain',
     u'value': 'nestle.com',
     u'seeder': 'salesforce'}
]

>>> client.update_object_signals(
...     'gd9eIipOQ-KobU0SwJ8VcQ', '2sic33jZTi-ifflvQAVcfw',
...     {'essentials': [
...         'discovery-baseobject-A96PWkLzTIWSJy3WMsvzzw']},
...     flat=True)
{u'essentials': [u'discovery-baseobject-A96PWkLzTIWSJy3WMsvzzw'],
 u'email_domain': u'nestle.com'}
```
