# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['linkedin_api',
 'linkedin_api.clients',
 'linkedin_api.clients.auth',
 'linkedin_api.clients.auth.utils',
 'linkedin_api.clients.common',
 'linkedin_api.clients.restli',
 'linkedin_api.clients.restli.utils',
 'linkedin_api.common']

package_data = \
{'': ['*']}

install_requires = \
['requests']

setup_kwargs = {
    'name': 'linkedin-api-client',
    'version': '0.2.0',
    'description': 'Official Python client library for LinkedIn APIs',
    'long_description': '# LinkedIn API Python Client\n\n## Overview\n\nThis library provides a thin Python client for making requests to LinkedIn APIs, utilizing the Python [requests](https://pypi.org/project/requests/) HTTP client library. LinkedIn\'s APIs are built on the [Rest.li](https://linkedin.github.io/rest.li/) framework with additional LinkedIn-specific constraints, which results in a robust yet complex protocol that can be challenging to implement correctly.\n\nThis library helps reduce this complexity by formatting requests correctly, providing proper request headers, and providing interfaces to develop against for responses. The library also provides an auth client for inspecting, generating, and refreshing access tokens, along with other helpful utilities.\n\n> :warning: This API client library is currently in beta and is subject to change. It may contain bugs, errors, or other issues that we are working to resolve. Use of this library is at your own risk. Please use caution when using it in production environments and be prepared for the possibility of unexpected behavior. We welcome any feedback or reports of issues that you may encounter while using this library.\n\n### Features\n\n- Generic support for all Rest.li methods used in LinkedIn APIs\n- Supports Rest.li protocol version 2.0.0\n- Provide interfaces for request options/response payloads\n- Built-in parameter encoding\n- Utilities (e.g. URN handling, encoding)\n- Supports versioned APIs\n- Automatic query tunneling of requests\n- 2-legged and 3-legged OAuth2 support\n\n### Table of Contents\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Getting Started](#getting-started)\n  - [Pre-requisites](#pre-requisites)\n  - [Simple API Request Example](#simple-api-request-example)\n  - [Finder Request Example](#finder-request-example)\n  - [More Examples](#more-examples)\n- [API Reference](#api-reference)\n  - [RestliClient](#class-restliclient)\n    - [Constructor](#constructor)\n    - [Properties](#properties)\n    - [Methods](#methods)\n      - [`get()`](#get-resource_path-access_token-path_keysnone-query_paramsnone-version_stringnone)\n      - [`batch_get()`](#batch_get-resource_path-ids-access_token-path_keysnone-query_paramsnone-version_stringnone)\n      - [`get_all()`](#get_all-resource_path-access_token-path_keysnone-query_paramsnone-version_stringnone)\n      - [`finder()`](#finder-resource_path-finder_name-access_token-path_keysnone-query_paramsnone-version_stringnone)\n      - [`batch_finder()`](#batch_finder-resource_path-finder_name-finder_criteria-access_token-path_keysnone-query_paramsnone-version_stringnone)\n      - [`create()`](#create-resource_path-entity-access_token-path_keysnone-query_paramsnone-version_stringnone)\n      - [`batch_create()`](#batch_create-resource_path-entities-access_token-path_keysnone-query_paramsnone-version_stringnone)\n      - [`update()`](#update-resource_path-entity-access_token-path_keysnone-query_paramsnone-version_stringnone)\n      - [`batch_update()`](#batch_update-resource_path-ids-entities-access_token-path_keysnone-query_paramsnone-version_stringnone)\n      - [`partial_update()`](#partial_update-resource_path-patch_set_object-access_token-path_keysnone-query_paramsnone-version_stringnone)\n      - [`batch_partial_update()`](#batch_partial_update-resource_path-ids-patch_set_objects-access_token-path_keysnone-query_paramsnone-version_stringnone)\n      - [`delete()`](#delete-resource_path-access_token-path_keysnone-query_paramsnone-version_stringnone)\n      - [`batch_delete()`](#batch_delete-resource_path-ids-access_token-path_keysnone-query_paramsnone-version_stringnone)\n      - [`action()`](#action-resource_path-action_name-access_token-action_paramsnone-path_keysnone-query_paramsnone-version_stringnone)\n  - [AuthClient](#class-authclient)\n    - [Constructor](#constructor-1)\n    - [Properties](#properties-1)\n    - [Methods](#methods-1)\n      - [`generate_member_auth_url()`](#generate_member_auth_url-scopes-statenone)\n      - [`exchange_auth_code_for_access_token()`](#exchange_auth_code_for_access_token-code)\n      - [`exchange_refresh_token_for_access_token()`](#exchange_refresh_token_for_access_token-refresh_token)\n      - [`get_two_legged_access_token()`](#get_two_legged_access_token-)\n      - [`introspect_access_token()`](#introspect_access_token-access_token)\n- [List of dependencies](#list-of-dependencies)\n\n\n## Requirements\n\n- Python >= 3.7\n\n\n## Installation\n\n```sh\npip install linkedin-api-client\n```\n\n## Getting Started\n\n### Pre-requisites\n\n1. Create or use an existing developer application from the [LinkedIn Developer Portal](https://www.linkedin.com/developers/apps/)\n2. Request access to the Sign In With LinkedIn API product. This is a self-serve product that will be provisioned immediately to your application.\n3. Generate a 3-legged access token using the Developer Portal [token generator tool](https://www.linkedin.com/developers/tools/oauth/token-generator), selecting the r_liteprofile scope.\n\n### Simple API Request Example\n\nHere is an example of using the client to make a simple GET request to [fetch the current user\'s profile](https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin#retrieving-member-profiles). This requires a 3-legged access token with the "r_liteprofile" scope, which is included with the Sign In With LinkedIn API product.\n\n```python\nfrom linkedin_api.clients.restli.client import RestliClient\n\nrestli_client = RestliClient()\n\nresponse = restli_client.get(\n  resource_path="/me",\n  access_token=<THREE_LEGGED_ACCESS_TOKEN>\n)\nprint(response.entity)\n```\n\n### Finder Request Example\n\nHere is a more non-trivial example to [find ad accounts](https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads/account-structure/create-and-manage-accounts?#search-for-accounts) by some search critiera. This requires a 3-legged access token with the "r_ads" scope, which is included with the Advertising APIs product.\n\nThe "search" query parameter in this case is not a primitive, but a complex object, which we represent as a dictionary. The client will handle the correct URL-encoding. This is a versioned API call, so we also need to provide the version string in the "YYYYMM" format.\n\n```python\nfrom linkedin_api.clients.restli.client import RestliClient\n\nrestli_client = RestliClient()\n\nresponse = restli_client.finder(\n  resource_path="/adAccounts",\n  finder_name="search",\n  query_params={\n    "search": {\n      "status": {\n        "values": ["ACTIVE", "DRAFT"]\n      },\n      "reference": {\n        "values": ["urn:li:organization:123"]\n      },\n      "test": True\n    }\n  },\n  version_string="202212",\n  acccess_token=<THREE_LEGGED_ACCESS_TOKEN>\n)\nad_accounts = response.elements\n```\n\n### More Examples\n\nThere are more examples of using the client in [/examples](examples/) directory.\n\n\n## API Reference\n\n### `class RestliClient`\n\nThe Rest.li API client defines instance methods for all the Rest.li methods which are used by LinkedIn APIs. All calls are blocking.\n\nRest.li defines a standard set of methods that can operate on a resource, each of which maps to an HTTP method. Depending on the resource, some Rest.li methods are not applicable or not implemented. Read the API docs to determine what Rest.li method is applicable and the relevant request parameters.\n\n#### Constructor\n\nAn instance of the API client must be created before using. This creates a session object that will be used for making all subsequent requests.\n\n```python\nfrom linkedin_api.clients.restli.client import RestliClient\n\nrestli_client = RestliClient()\n```\n\nThe Requests library [session](https://requests.readthedocs.io/en/latest/user/advanced/#session-objects) object is accessible to configure any additional global settings (e.g. configuring event hooks).\n\n```python\nrestli_client.session.hooks = { \'response\': [do_something_fn, do_something_2_fn] }\n```\n\n#### Properties\n\n| Property | Description |\n|---|---|\n| `session` | The session object used for making http requests. This is exposed to allow for additional configuration (e.g. adding custom request/response event hooks). |\n\n#### Methods\n\n##### Base Request Parameters\n\nAll Rest.li request methods of the API client support the following request parameters:\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `resource_path` | str | Yes | <p>The resource path after the base URL, beginning with a forward slash. If the path contains keys, add curly-brace placeholders for the keys and specify the path key-value map in the `path_keys` argument.</p><p>Examples:</p><ul><li>`resource_path="/me"`</li><li>`resource_path="/adAccounts/{id}"`</li><li>`resource_path="/socialActions/{actionUrn}/comments/{commentId}"`</li><li>`resource_path="/campaignConversions/{key}`</li></ul>|\n| `access_token` | str | Yes | The access token that should provide the application access to the specified API |\n| `path_keys` | Dict[str,Any] | No | <p>If there are path keys that are part of the `resource_path` argument, the key placeholders must be specified in the provided `path_keys` map. The path key values can be strings, numbers, or objects (dictionaries), and these will be properly encoded.</p><p>Examples:</p><p><ul><li>`path_keys={"id": 123"}`</li><li>`path_keys={"actionUrn":"urn:li:share:123","commentId":987`}</li><li>`path_keys={"key": {"campaign": "urn:li:sponsoredCampaign:123", "conversion": "urn:lla:llaPartnerConversion:456"}}`</li></ul></p> |\n| `query_params` | Dict[str,Any] | No | A map of query parameters. The query parameter values (strings, lists, objects) will be correctly encoded by this method, so these should not be encoded. |\n| `version_string` | str | No | An optional version string of the format "YYYYMM" or "YYYYMM.RR". If specified, the version header will be passed and the request will use the versioned APIs base URL |\n\n##### `get (resource_path, access_token, path_keys=None, query_params=None, version_string=None)`\n\nMakes a Rest.li GET request to fetch the specified entity on a resource. This method will perform query tunneling if necessary.\n\n**Parameters:**\n\nThis method only uses the [base request parameters](#base-request-parameters) defined above.\n\n**Return value:**\n\nReturns [GetResponse](#class-getresponse) object\n\n**Example:**\n\n```python\nresponse = restli_client.get(\n  resource_path="/adAccounts/{id}"\n  path_keys={ "id": 123 },\n  query_params={ "fields": "id,name" }\n  access_token=MY_ACCESS_TOKEN,\n  version_string="202212"\n)\nad_account = response.entity\n```\n\n\n##### `batch_get (resource_path, ids, access_token, path_keys=None, query_params=None, version_string=None)`\n\nMakes a Rest.li BATCH_GET request to fetch multiple entities on a resource. This method will perform query tunneling if necessary.\n\n**Parameters:**\n\nThe additional parameters besides the [base request parameters](#base-request-parameters) are:\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `ids` | List[Union[str,int,Dict[str,Any]]] | Yes | The list of entity ids to fetch on the resource. These will be encoded and added to the query parameters. |\n\n**Return value:**\n\nReturns a [BatchGetResponse](#class-batchgetresponse) object.\n\n**Example:**\n\n```python\nresponse = restli_client.batch_get(\n  resource_path="/adCampaignGroups",\n  ids=[123, 456, 789],\n  access_token=MY_ACCESS_TOKEN,\n  version_string="202212"\n)\ncampaign_groups = response.results.items()\n```\n\n\n##### `get_all (resource_path, access_token, path_keys=None, query_params=None, version_string=None)`\n\nMakes a Rest.li GET_ALL request to fetch all entities on a resource.\n\n**Parameters:**\n\nThis method only uses the [base request parameters](#base-request-parameters) defined above.\n\n**Return value:**\n\nReturns [CollectionResponse](#class-collectionresponse) object\n\n**Example:**\n\n```python\nresponse = restli_client.get_all(\n  resource_path="/fieldsOfStudy",\n  query_params={\n    "start": 0,\n    "count": 15\n  },\n  access_token=MY_ACCESS_TOKEN,\n  version_string="202212"\n)\nfields_of_study = response.elements\ntotal = response.paging.total\n```\n\n##### `finder (resource_path, finder_name, access_token, path_keys=None, query_params=None, version_string=None)`\n\nMakes a Rest.li FINDER request to find entities by some specified criteria.\n\n**Parameters:**\n\nThe additional parameters besides the [base request parameters](#base-request-parameters) are:\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `finder_name` | str | Yes | The Rest.li finder name. This will be added to the request query parameters. |\n\n**Return value:**\n\nReturns a [CollectionResponse](#class-collectionresponse) object.\n\n**Example:**\n\n```python\nresponse = restli_client.finder(\n  resource_path="/adAccounts",\n  finder_name="search",\n  query_params={\n    "search": {\n        "status": {\n            "values": ["ACTIVE", "DRAFT", "CANCELED"]\n        },\n        "reference": {\n            "values": ["urn:li:organization:123"]\n        },\n        "test": False\n    },\n    "start": 0,\n    "count": 5\n  },\n  access_token=MY_ACCESS_TOKEN,\n  version_string="202212"\n)\nad_accounts = response.elements\ntotal = response.paging.total\n```\n\n##### `batch_finder (resource_path, finder_name, finder_criteria, access_token, path_keys=None, query_params=None, version_string=None)`\n\nMakes a Rest.li BATCH_FINDER request to find entities by multiple sets of criteria.\n\n**Parameters:**\n\nThe additional parameters besides the [base request parameters](#base-request-parameters) are:\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `finder_name` | str | Yes | The Rest.li batch finder name (the value of the "bq" query parameter). This will be added to the request query parameters. |\n| `finder_criteria` | Tuple[str, List[Dict[str,Any]]] | Yes | The required batch finder criteria information. This is a tuple with the first value being the batch finder criteria parameter name. The second value is the list of finder param objects. The batch finder results are correspondingly ordered according to this list. The batch finder criteria will be encoded and added to the request query parameters. |\n\n**Return value:**\n\nReturns a [BatchFinderResponse](#class-batchfinderresponse) object.\n\n**Example:**\n\n```python\nresponse = restli_client.batch_finder(\n  resource_path="/organizationAuthorizations",\n  finder_name="authorizationActionsAndImpersonator",\n  finder_criteria=("authorizationActions", [\n      {\n        "OrganizationRoleAuthorizationAction": {\n          actionType: "ADMINISTRATOR_READ"\n        }\n      },\n      {\n        "OrganizationContentAuthorizationAction": {\n          actionType: "ORGANIC_SHARE_DELETE"\n        }\n      }\n    ]\n  ),\n  access_token=MY_ACCESS_TOKEN,\n  version_string="202212"\n)\nadmin_read_authorizations = response.results[0].elements\norganic_share_delete_authorizations = response.results[1].elements\n```\n\n##### `create (resource_path, entity, access_token, path_keys=None, query_params=None, version_string=None)`\n\nMakes a Rest.li CREATE request to create a new resource entity.\n\n**Parameters:**\n\nThe additional parameters besides the [base request parameters](#base-request-parameters) are:\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `entity` | Dict[str,Any] | Yes | A dictionary representation of the entity to create |\n\n**Return value:**\n\nReturns a [CreateResponse](#class-createresponse) object.\n\n**Example:**\n\n```python\nresponse = restli_client.create(\n  resource_path="/adAccountsV2",\n  entity={\n    "name": "Test Ad Account",\n    "type": "BUSINESS",\n    "test": True\n  },\n  access_token=MY_ACCESS_TOKEN\n)\ncreated_entity_id = response.entity_id\n```\n\n##### `batch_create (resource_path, entities, access_token, path_keys=None, query_params=None, version_string=None)`\n\nMakes a Rest.li BATCH_CREATE request to create multiple entities in a single call.\n\n**Parameters:**\n\nThe additional parameters besides the [base request parameters](#base-request-parameters) are:\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `entities` | List[Dict[str,Any]] | Yes | A list of entities to create |\n\n**Return value:**\n\nReturns a [BatchCreateResponse](#class-batchcreateresponse) object.\n\n**Example:**\n\n```python\nresponse = restli_client.batch_create(\n  resource_path="/adCampaignGroups",\n  entities=[\n    {\n        account: \'urn:li:sponsoredAccount:111\',\n        name: \'CampaignGroupTest1\',\n        status: \'DRAFT\'\n    },\n    {\n        account: \'urn:li:sponsoredAccount:222\',\n        name: \'CampaignGroupTest2\',\n        status: \'DRAFT\'\n    }\n  ],\n  access_token=MY_ACCESS_TOKEN,\n  version_string="202212"\n)\ncreated_elements = response.elements\nfirst_created_element_id = response.elements[0].id\n```\n\n##### `update (resource_path, entity, access_token, path_keys=None, query_params=None, version_string=None)`\n\nMakes a Rest.li UPDATE request to update an entity (overwriting the entity with the provided value).\n\n**Parameters:**\n\nThe additional parameters besides the [base request parameters](#base-request-parameters) are:\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `entity` | Dict[str,Any] | Yes | The value of the updated entity. This will completely overwrite the entity. |\n\n**Return value:**\n\nReturns a [UpdateResponse](#class-updateresponse) object.\n\n**Example:**\n\n```python\nresponse = restli_client.update(\n  resource_path="/adAccountUsers/{id}",\n  path_keys={\n    "id": {\n      "account": "urn:li:sponsoredAccount:123",\n      "user": "urn:li:person:foobar"\n    }\n  },\n  entity: {\n    "account": "urn:li:sponsoredAccount:123",\n    "user": "urn:li:person:foobar",\n    "role": "VIEWER"\n  },\n  access_token=MY_ACCESS_TOKEN,\n  version_string="202212"\n)\nstatus = response.status_code\n```\n\n##### `batch_update (resource_path, ids, entities, access_token, path_keys=None, query_params=None, version_string=None)`\n\nMakes a Rest.li BATCH_UPDATE request to update multiple entities in a single call.\n\n**Parameters:**\n\nThe additional parameters besides the [base request parameters](#base-request-parameters) are:\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `ids` | List[Union[str,int,Dict[str,Any]]] | Yes | The ids of the entities to update |\n| `entities` | List[Dict[str,Any]] | Yes | The values to update the specified entities to. This should be the same order as the `ids` argument. |\n\n**Return value:**\n\nReturns a [BatchUpdateResponse](#class-batchupdateresponse) object.\n\n**Example:**\n\n```python\nresponse = restli_client.batch_update(\n  resource_path="/campaignConversions",\n  ids=[\n    { "campaign": "urn:li:sponsoredCampaign:123", "conversion": "urn:lla:llaPartnerConversion:456" },\n    { "campaign": "urn:li:sponsoredCampaign:123", "conversion": "urn:lla:llaPartnerConversion:789" }\n  ],\n  entities=[\n    { "campaign": "urn:li:sponsoredCampaign:123", "conversion": "urn:lla:llaPartnerConversion:456" },\n    { "campaign": "urn:li:sponsoredCampaign:123", "conversion": "urn:lla:llaPartnerConversion:789" }\n  ],\n  access_token=MY_ACCESS_TOKEN,\n  version_string="202212"\n)\nbatch_results = response.results.items()\n```\n\n##### `partial_update (resource_path, patch_set_object, access_token, path_keys=None, query_params=None, version_string=None)`\n\nMakes a Rest.li PARTIAL_UPDATE request to update part of an entity. Directly specify the patch object to send in the request.\n\nNote: While the Rest.li protocol supports very granular patch objects with setting and deletion of nested properties, most LinkedIn APIs only support partial update on the top-level fields of an entity.\n\n**Parameters:**\n\nThe additional parameters besides the [base request parameters](#base-request-parameters) are:\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `patch_set_object` | Dict[str,Any] | Yes | The value of the entity with only the modified fields present. This will be sent directly in the request body as `patch: { $set: patch_set_object }`. |\n\n**Return value:**\n\nReturns a [UpdateResponse](#class-updateresponse) object.\n\n**Example:**\n\n```python\nresponse = restli_client.partial_update(\n  resource_path="/adAccounts/{id}",\n  path_keys={ "id": 123 },\n  patch_set_object: {\n    "name": "TestAdAccountModified",\n    "reference": "urn:li:organization:456"\n  },\n  access_token=MY_ACCESS_TOKEN,\n  version_string="202212"\n)\nstatus = response.status_code\n```\n\n##### `batch_partial_update (resource_path, ids, patch_set_objects, access_token, path_keys=None, query_params=None, version_string=None)`\n\nMakes a Rest.li BATCH_PARTIAL_UPDATE request to update multiple entities at once, by only providing the fields of the entities that require updating.\n\n**Parameters:**\n\nThe additional parameters besides the [base request parameters](#base-request-parameters) are:\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `ids` | List[Union[str,int,Dict[str,Any]]] | Yes | The list of entity ids to update. These will be encoded and added to the query parameters. |\n| `patch_set_objects` | List[Dict[str,Any]] | Yes | The list of entity values, represented as a dictionary, with only the modified fields present. |\n\n**Return value:**\n\nReturns a [BatchUpdateResponse](#class-batchupdateresponse) object.\n\n**Example:**\n\n```python\nresponse = restli_client.batch_partial_update(\n  resource_path="/adCampaignGroups",\n  ids=["123", "456"],\n  patch_set_objects: [\n    { "status": "ACTIVE" },\n    {\n      "runSchedule": {\n        "start": 1678029270721,\n        "end": 1679029270721\n      }\n    }\n  ],\n  access_token=MY_ACCESS_TOKEN,\n  version_string="202212"\n)\nresult_status = response.results["123"].status\n```\n\n##### `delete (resource_path, access_token, path_keys=None, query_params=None, version_string=None)`\n\nMakes a Rest.li DELETE request to delete an entity.\n\n**Parameters:**\n\nThis method only uses the [base request parameters](#base-request-parameters) defined above.\n\n**Return value:**\n\nReturns [BaseRestliResponse](#class-baserestliresponse) object\n\n**Example:**\n\n```python\nresponse = restli_client.delete(\n  resource_path="/adAccounts/{id}",\n  path_keys={ "id": 123 },\n  access_token=MY_ACCESS_TOKEN,\n  version_string="202212"\n)\nstatus_code = response.status_code\n```\n\n##### `batch_delete (resource_path, ids, access_token, path_keys=None, query_params=None, version_string=None)`\n\nMakes a Rest.li BATCH_DELETE request to delete multiple entities at once.\n\n**Parameters:**\n\nThe additional parameters besides the [base request parameters](#base-request-parameters) are:\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `ids` | List[Union[str,int,Dict[str,Any]]] | Yes | The list of entity ids to delete. These will be encoded and added to the query parameters. |\n\n**Return value:**\n\nReturns [BatchDeleteResponse](#class-batchdeleteresponse) object\n\n**Example:**\n\n```python\nresponse = restli_client.batch_delete(\n  resource_path="/adAccounts",\n  ids=["123", "456"],\n  access_token=MY_ACCESS_TOKEN,\n  version_string="202212"\n)\nstatus_code = response.results["123"].status\n```\n\n##### `action (resource_path, action_name, access_token, action_params=None, path_keys=None, query_params=None, version_string=None)`\n\nMakes a Rest.li ACTION request to perform an action on a specified resource. This method is flexible and generally used when the action does not fit within the standard behavior defined by the other Rest.li methods.\n\n**Parameters:**\n\nThe additional parameters besides the [base request parameters](#base-request-parameters) are:\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `action_name` | str | Yes | The action method name. This will be added to the query parameters. |\n| `action_params` | Dict[str,Any] | No | An optional map of action parameters and their values. This will be sent in the request body. |\n\n**Return value:**\n\nReturns [ActionResponse](#class-actionresponse) object\n\n**Example:**\n\n```python\nresponse = restli_client.action(\n  resource_path="/liveAssetActions",\n  action_name="register",\n  action_params={\n    "registerLiveEventRequest": {\n      "owner": "urn:li:person:12345",\n      "recipes": ["urn:li:digitalmediaRecipe:feedshare-live-video"],\n      "region": "WEST_US"\n    }\n  },\n  access_token=MY_ACCESS_TOKEN\n)\nstatus_code = response.status_code\n```\n\n#### Response Classes\n\n##### `class BaseRestliResponse`\n\nAll Rest.li request methods of the API client return a response object subclassed from BaseRestliResponse, containing standard response data, along with the original, raw response object.\n\n| Properties | Type | Description |\n|---|---|---|\n| `status_code` | int | Response status code |\n| `url` | str | The final URL location of the response |\n| `headers` | CaseInsensitiveDict | A case-insensitive dictionary of response headers |\n| `response` | Response | The raw requests.Response object |\n\n##### `class Paging`\n\nPaging metadata class\n\n| Properties | Type | Description |\n|---|---|---|\n| start | int | The start index of returned results (zero-based index) |\n| count | int | The number of results returned in the response |\n| total | int | The total number of results available |\n\n##### `class GetResponse`\n\nBase class: [BaseRestliResponse](#class-baserestliresponse)\n\n| Properties | Type | Description |\n|---|---|---|\n| `entity` | Union[Dict[str,Any], str, int, bool] | The representation (typically a dictionary) of the retrieved entity, decoded from the json-encoded response content |\n\n##### `class BatchGetResponse`\n\nBase class: [BaseRestliResponse](#class-baserestliresponse)\n\n| Properties | Type | Description |\n|---|---|---|\n| `results` | Dict[str,Any] | A map of entities that were successfully retrieved, with the key being the encoded entity id, and the value being a dictionary representing the entity |\n| `statuses` | Dict[str,int] | A map of entities and status code, with the key being the encoded entity id, and the value being the status code number value. |\n| `errors` | Dict[str,Any] | A map containing entities that could not be successfully fetched, with the key being the encoded entity id, and the value being the error response. |\n\n##### `class CollectionResponse`\n\nBase class: [BaseRestliResponse](#class-baserestliresponse)\n\n| Properties | Type | Description |\n|---|---|---|\n| `elements` | List[Dict[str,Any]] | The list of entities returned in the response |\n| `paging` | [Paging](#class-paging) | Optional paging metadata object |\n| `metadata` | Any | Optional response metadata object |\n\n##### `class BatchFinderResponse`\n\nBase class: [BaseRestliResponse](#class-baserestliresponse)\n\n| Properties | Type | Description |\n|---|---|---|\n| `results` | List[[BatchFinderResult](#class-batchfinderresult)] | The list of finder results, in the same order as the requested batch finder search criteria list |\n\n##### `class BatchFinderResult`\n\n| Properties | Type | Description |\n|---|---|---|\n| `elements` | List[Dict[str,Any]] | The list of entities found for the corresponding finder criteria |\n| `paging` | [Paging](#class-paging) | Optional paging metadata object |\n| `metadata` | Any | Optional response metadata object |\n| `error` | Any | Optional error details if finder call failed |\n| `isError` | bool | Flag if this finder call experienced an error |\n\n##### `class CreateResponse`\n\nBase class: [BaseRestliResponse](#class-baserestliresponse)\n\n| Properties | Type | Description |\n|---|---|---|\n| `entity_id` | str | The encoded entity id |\n| `entity` | Dict[str,Any] | Optional created entity. Some APIs support returning the created entity to eliminate the need for a subsequent GET call. |\n\n##### `class BatchCreateResponse`\n\nBase class: [BaseRestliResponse](#class-baserestliresponse)\n\n| Properties | Type | Description |\n|---|---|---|\n| `elements` | List[[BatchCreateResult](#class-batchcreateresult)] | The list of batch create results, corresponding to the order of the `entities` request parameter |\n\n##### `class BatchCreateResult`\n\n| Properties | Type | Description |\n|---|---|---|\n| `status` | int | The status code of the individual create call |\n| `id` | str | The id of the created entity |\n| `error` | Any | Error details if the create call experienced an error |\n\n##### `class UpdateResponse`\n\nBase class: [BaseRestliResponse](#class-baserestliresponse)\n\n| Properties | Type | Description |\n|---|---|---|\n| `entity` | Dict[str,Any] | Optional entity after the update. Some APIs support returning the updated entity to eliminate the need for a subsequent GET call. |\n\n##### `class BatchUpdateResponse`\n\nBase class: [BaseRestliResponse](#class-baserestliresponse)\n\n| Properties | Type | Description |\n|---|---|---|\n| `results` | Dict[str,[BatchUpdateResult](#class-batchupdateresult)] | The results map where the keys are the encoded entity ids, and the values are the individual update call results, which includes the status code. |\n\n##### `class BatchUpdateResult`\n\n| Properties | Type | Description |\n|---|---|---|\n| `status` | int | The status code of the individual update call |\n\n##### `class BatchDeleteResponse`\n\nBase class: [BaseRestliResponse](#class-baserestliresponse)\n\n| Properties | Type | Description |\n|---|---|---|\n| `results` | Dict[str,[BatchDeleteResult](#class-batchdeleteresult)] | The results map where the keys are the encoded entity ids, and the values are the individual delete call results, which includes the status code. |\n\n##### `class BatchDeleteResult`\n\n| Properties | Type | Description |\n|---|---|---|\n| `status` | int | The status code of the delete call |\n\n##### `class ActionResponse`\n\nBase class: [BaseRestliResponse](#class-baserestliresponse)\n\n| Properties | Type | Description |\n|---|---|---|\n| `value` | Any | The action response value |\n\n\n### `class AuthClient`\n\nWhile we recommend using any of several popular, open-source libraries for robustly managing OAuth 2.0 authentication, we provide a basic Auth Client as a convenience for testing APIs and getting started.\n\n#### Constructor\n\n```python\nfrom linkedin_api.clients.auth.client import AuthClient\n\nauth_client = AuthClient(client_id=MY_CLIENT_ID, client_secret=MY_CLIENT_SECRET, redirect_url=MY_REDIRECT_URL)\n```\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `client_id` | str | Yes | Client ID of your developer application. This can be found on your application auth settings page in the Developer Portal. |\n| `client_secret` | str | Yes | Client secret of your developer application. This can be found on your application auth settings page in the Developer Portal. |\n| `redirect_url` | str | No | If your integration will be using the authorization code flow to obtain 3-legged access tokens, this should be provided. This redirect URL must match one of the redirect URLs configured in the app auth settings page in the Developer Portal. |\n\n#### Properties\n\n| Property | Description |\n|---|---|\n| `session` | The session object used for making http requests. This is exposed to allow for additional configuration (e.g. adding custom request/response event hooks). |\n\n#### Methods\n\n##### `generate_member_auth_url (scopes, state=None)`\n\nGenerates the member authorization URL to direct members to. Once redirected, the member will be presented with LinkedIn\'s OAuth consent page showing the OAuth scopes your application is requesting on behalf of the user.\n\n**Parameters:**\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `scopes` | List[str] | Yes | An array of OAuth scopes (3-legged member permissions) your application is requesting on behalf of the user. |\n| `state` | str | No | An optional string that can be provided to test against CSRF attacks. |\n\n**Return value:**\n\nThe member authorization URL string\n\n##### `exchange_auth_code_for_access_token (code)`\n\nExchanges an authorization code for a 3-legged access token. After member authorization, the browser redirects to the provided redirect URL, setting the authorization code on the `code` query parameter.\n\n**Parameters:**\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `code` | str | Yes | The authorization code to exchange for an access token |\n\n**Return value:**\n\nReturns an [AccessToken3LResponse](#class-accesstoken3lresponse) object\n\n##### `exchange_refresh_token_for_access_token (refresh_token)`\n\nExchanges a refresh token for a new 3-legged access token. This allows access tokens to be refreshed without having the member reauthorize your application.\n\n**Parameters:**\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `refresh_token` | str | Yes | The authorization code to exchange for an access token |\n\n**Return value:**\n\nReturns a [RefreshTokenExchangeResponse](#class-refreshtokenexchangeresponse) object\n\n##### `get_two_legged_access_token ()`\n\nUse client credential flow (2-legged OAuth) to retrieve a 2-legged access token for accessing APIs that are not member-specific. Developer applications do not have the client credential flow enabled by default.\n\n**Parameters:**\n\nNone\n\n**Return value:**\n\nReturns an [AccessToken2LResponse](#class-accesstoken2lresponse) object\n\n##### `introspect_access_token (access_token)`\n\nIntrospect a 2-legged, 3-legged or Enterprise access token to get information on status, expiry, and other details.\n\n**Parameters:**\n\n| Parameter | Type | Required? | Description |\n|---|---|---|---|\n| `access_token` | str | Yes | A 2-legged, 3-legged or Enterprise access token. |\n\n**Return value:**\n\nReturns an [IntrospectTokenResponse](#class-introspecttokenresponse) object\n\n\n#### Response Classes\n\n##### `class BaseAuthResponse`\n\nAll request methods of the AuthClient return a response object subclassed from BaseAuthResponse, containing standard response data, along with the original, raw response object.\n\n| Properties | Type | Description |\n|---|---|---|\n| `status_code` | int | Response status code |\n| `url` | str | The final URL location of the response |\n| `headers` | CaseInsensitiveDict | A case-insensitive dictionary of response headers |\n| `response` | Response | The raw requests.Response object |\n\n##### `class AccessToken3LResponse`\n\nBase class: [BaseAuthResponse](#class-baseauthresponse)\n\n| Properties | Type | Description |\n|---|---|---|\n| `access_token` | str | The 3-legged access token |\n| `expires_in` | int | The TTL of the access token, in seconds |\n| `refresh_token` | str | The refresh token value. This is only present if refresh tokens are enabled for the application. |\n| `refresh_token_expires_in` | Number | The TTL of the refresh token, in seconds. This is only present if refresh tokens are enabled for the application. |\n| `scope` | str | A comma-separated list of scopes authorized by the member (e.g. "r_liteprofile,r_ads") |\n\n##### `class AccessToken2LResponse`\n\nBase class: [BaseAuthResponse](#class-baseauthresponse)\n\n| Properties | Type | Description |\n|---|---|---|\n| `access_token` | str | The 2-legged access token |\n| `expires_in` | int | The TTL of the access token, in seconds |\n\n##### `class RefreshTokenExchangeResponse`\n\nBase class: [BaseAuthResponse](#class-baseauthresponse)\n\n| Properties | Type | Description |\n|---|---|---|\n| `access_token` | str | The 3-legged access token |\n| `expires_in` | int | The TTL of the access token, in seconds |\n| `refresh_token` | str | The refresh token value. This is only present if refresh tokens are enabled for the application. |\n| `refresh_token_expires_in` | Number | The TTL of the refresh token, in seconds. This is only present if refresh tokens are enabled for the application. |\n\n\n##### `class IntrospectTokenResponse`\n\nBase class: [BaseAuthResponse](#class-baseauthresponse)\n\n| Properties | Type | Description |\n|---|---|---|\n| `active` | str | Flag whether the token is a valid, active token. |\n| `auth_type` | str | The auth type of the token ("2L", "3L" or "Enterprise_User") |\n| `authorized_at` | str | Epoch time in seconds, indicating when the token was authorize |\n| `client_id` | str | Developer application client ID |\n| `created_at` | int | Epoch time in seconds, indicating when this token was originally issued |\n| `expires_at` | int | Epoch time in seconds, indicating when this token will expire |\n| `scope` | str | A string containing a comma-separated list of scopes associated with this token. This is only returned for 3-legged member tokens. |\n| `status` | str | The token status, which is an enum string with values "revoked", "expired" or "active" |\n\n---\n\n## List of dependencies\n\nThe following table is a list of production dependencies.\n\n| Component Name | License | Linked | Modified |\n|---|---|---|---|\n| [requests](https://pypi.org/project/requests/) | Apache 2.0 | Static | No |\n',
    'author': 'Steven Shimizu',
    'author_email': 'sshimizu@linkedin.com',
    'maintainer': 'None',
    'maintainer_email': 'None',
    'url': 'https://github.com/linkedin-developers/linkedin-api-python-client',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'python_requires': '>=3.7,<4.0',
}


setup(**setup_kwargs)
