Skip to content

Commit b04e69c

Browse files
Merge pull request #3 from mxenabled/bm/update_readme_and_categories
Update README and categories
2 parents a580890 + fe4e11a commit b04e69c

File tree

10 files changed

+456
-29
lines changed

10 files changed

+456
-29
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@ Python >= 3.6
1414

1515
## Installation
1616

17-
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
17+
Install the package using pip from PyPI by running:
18+
```shell
19+
pip install mx-platform-python
20+
```
1821

22+
Or install it yourself with:
1923
```shell
20-
python setup.py install --user
24+
python setup.py install
2125
```
22-
(or `sudo python setup.py install` to install the package for all users)
2326

2427
Then import the package:
2528
```python

docs/MxPlatformApi.md

Lines changed: 174 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ Method | HTTP request | Description
3333
[**list_account_numbers_by_member**](MxPlatformApi.md#list_account_numbers_by_member) | **GET** /users/{user_guid}/members/{member_guid}/account_numbers | List account numbers by member
3434
[**list_account_owners_by_member**](MxPlatformApi.md#list_account_owners_by_member) | **GET** /users/{user_guid}/members/{member_guid}/account_owners | List account owners by member
3535
[**list_categories**](MxPlatformApi.md#list_categories) | **GET** /users/{user_guid}/categories | List categories
36-
[**list_default_categories**](MxPlatformApi.md#list_default_categories) | **GET** /users/{user_guid}/categories/default | List default categories
36+
[**list_default_categories**](MxPlatformApi.md#list_default_categories) | **GET** /categories/default | List default categories
37+
[**list_default_categories_by_user**](MxPlatformApi.md#list_default_categories_by_user) | **GET** /users/{user_guid}/categories/default | List default categories by user
3738
[**list_favorite_institutions**](MxPlatformApi.md#list_favorite_institutions) | **GET** /institutions/favorites | List favorite institutions
3839
[**list_holdings**](MxPlatformApi.md#list_holdings) | **GET** /users/{user_guid}/holdings | List holdings
3940
[**list_holdings_by_member**](MxPlatformApi.md#list_holdings_by_member) | **GET** /users/{user_guid}/members/{member_guid}/holdings | List holdings by member
@@ -58,7 +59,8 @@ Method | HTTP request | Description
5859
[**list_user_accounts**](MxPlatformApi.md#list_user_accounts) | **GET** /users/{user_guid}/accounts | List accounts
5960
[**list_users**](MxPlatformApi.md#list_users) | **GET** /users | List users
6061
[**read_account**](MxPlatformApi.md#read_account) | **GET** /users/{user_guid}/accounts/{account_guid} | Read account
61-
[**read_category**](MxPlatformApi.md#read_category) | **GET** /users/{user_guid}/categories/{category_guid} | Read category
62+
[**read_category**](MxPlatformApi.md#read_category) | **GET** /users/{user_guid}/categories/{category_guid} | Read a custom category
63+
[**read_default_category**](MxPlatformApi.md#read_default_category) | **GET** /categories/{category_guid} | Read a default category
6264
[**read_holding**](MxPlatformApi.md#read_holding) | **GET** /users/{user_guid}/holdings/{holding_guid} | Read holding
6365
[**read_institution**](MxPlatformApi.md#read_institution) | **GET** /institutions/{institution_code} | Read institution
6466
[**read_managed_account**](MxPlatformApi.md#read_managed_account) | **GET** /users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid} | Read managed account
@@ -2579,11 +2581,11 @@ Name | Type | Description | Notes
25792581
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
25802582

25812583
# **list_default_categories**
2582-
> CategoriesResponseBody list_default_categories(user_guid)
2584+
> CategoriesResponseBody list_default_categories()
25832585
25842586
List default categories
25852587

2586-
Use this endpoint to read the attributes of a specific user.
2588+
Use this endpoint to retrieve a list of all the default categories and subcategories offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience.
25872589

25882590
### Example
25892591

@@ -2616,26 +2618,107 @@ configuration = mx_platform_python.Configuration(
26162618
with mx_platform_python.ApiClient(configuration) as api_client:
26172619
# Create an instance of the API class
26182620
api_instance = mx_platform_api.MxPlatformApi(api_client)
2619-
user_guid = "USR-fa7537f3-48aa-a683-a02a-b18940482f54" # str | The unique id for a `user`.
26202621
page = 1 # int | Specify current page. (optional)
26212622
records_per_page = 10 # int | Specify records per page. (optional)
26222623

26232624
# example passing only required values which don't have defaults set
2625+
# and optional values
26242626
try:
26252627
# List default categories
2626-
api_response = api_instance.list_default_categories(user_guid)
2628+
api_response = api_instance.list_default_categories(page=page, records_per_page=records_per_page)
26272629
pprint(api_response)
26282630
except mx_platform_python.ApiException as e:
26292631
print("Exception when calling MxPlatformApi->list_default_categories: %s\n" % e)
2632+
```
2633+
2634+
2635+
### Parameters
2636+
2637+
Name | Type | Description | Notes
2638+
------------- | ------------- | ------------- | -------------
2639+
**page** | **int**| Specify current page. | [optional]
2640+
**records_per_page** | **int**| Specify records per page. | [optional]
2641+
2642+
### Return type
2643+
2644+
[**CategoriesResponseBody**](CategoriesResponseBody.md)
2645+
2646+
### Authorization
2647+
2648+
[basicAuth](../README.md#basicAuth)
2649+
2650+
### HTTP request headers
2651+
2652+
- **Content-Type**: Not defined
2653+
- **Accept**: application/vnd.mx.api.v1+json
2654+
2655+
2656+
### HTTP response details
2657+
2658+
| Status code | Description | Response headers |
2659+
|-------------|-------------|------------------|
2660+
**200** | OK | - |
2661+
2662+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
2663+
2664+
# **list_default_categories_by_user**
2665+
> CategoriesResponseBody list_default_categories_by_user(user_guid)
2666+
2667+
List default categories by user
2668+
2669+
Use this endpoint to retrieve a list of all the default categories and subcategories, scoped by user, offered within the MX Platform API. In other words, each item in the returned list will have its `is_default` field set to `true`. There are currently 119 default categories and subcategories. Both the _list default categories_ and _list default categories by user_ endpoints return the same results. The different routes are provided for convenience.
2670+
2671+
### Example
2672+
2673+
* Basic Authentication (basicAuth):
2674+
2675+
```python
2676+
import time
2677+
import mx_platform_python
2678+
from mx_platform_python.api import mx_platform_api
2679+
from mx_platform_python.model.categories_response_body import CategoriesResponseBody
2680+
from pprint import pprint
2681+
# Defining the host is optional and defaults to https://api.mx.com
2682+
# See configuration.py for a list of all supported configuration parameters.
2683+
configuration = mx_platform_python.Configuration(
2684+
host = "https://api.mx.com"
2685+
)
2686+
2687+
# The client must configure the authentication and authorization parameters
2688+
# in accordance with the API server security policy.
2689+
# Examples for each auth method are provided below, use the example that
2690+
# satisfies your auth use case.
2691+
2692+
# Configure HTTP basic authorization: basicAuth
2693+
configuration = mx_platform_python.Configuration(
2694+
username = 'YOUR_USERNAME',
2695+
password = 'YOUR_PASSWORD'
2696+
)
2697+
2698+
# Enter a context with an instance of the API client
2699+
with mx_platform_python.ApiClient(configuration) as api_client:
2700+
# Create an instance of the API class
2701+
api_instance = mx_platform_api.MxPlatformApi(api_client)
2702+
user_guid = "USR-fa7537f3-48aa-a683-a02a-b18940482f54" # str | The unique id for a `user`.
2703+
page = 1 # int | Specify current page. (optional)
2704+
records_per_page = 10 # int | Specify records per page. (optional)
2705+
2706+
# example passing only required values which don't have defaults set
2707+
try:
2708+
# List default categories by user
2709+
api_response = api_instance.list_default_categories_by_user(user_guid)
2710+
pprint(api_response)
2711+
except mx_platform_python.ApiException as e:
2712+
print("Exception when calling MxPlatformApi->list_default_categories_by_user: %s\n" % e)
26302713

26312714
# example passing only required values which don't have defaults set
26322715
# and optional values
26332716
try:
2634-
# List default categories
2635-
api_response = api_instance.list_default_categories(user_guid, page=page, records_per_page=records_per_page)
2717+
# List default categories by user
2718+
api_response = api_instance.list_default_categories_by_user(user_guid, page=page, records_per_page=records_per_page)
26362719
pprint(api_response)
26372720
except mx_platform_python.ApiException as e:
2638-
print("Exception when calling MxPlatformApi->list_default_categories: %s\n" % e)
2721+
print("Exception when calling MxPlatformApi->list_default_categories_by_user: %s\n" % e)
26392722
```
26402723

26412724

@@ -4847,7 +4930,7 @@ Name | Type | Description | Notes
48474930
# **read_category**
48484931
> CategoryResponseBody read_category(category_guid, user_guid)
48494932
4850-
Read category
4933+
Read a custom category
48514934

48524935
Use this endpoint to read the attributes of either a default category or a custom category.
48534936

@@ -4887,14 +4970,94 @@ with mx_platform_python.ApiClient(configuration) as api_client:
48874970

48884971
# example passing only required values which don't have defaults set
48894972
try:
4890-
# Read category
4973+
# Read a custom category
48914974
api_response = api_instance.read_category(category_guid, user_guid)
48924975
pprint(api_response)
48934976
except mx_platform_python.ApiException as e:
48944977
print("Exception when calling MxPlatformApi->read_category: %s\n" % e)
48954978
```
48964979

48974980

4981+
### Parameters
4982+
4983+
Name | Type | Description | Notes
4984+
------------- | ------------- | ------------- | -------------
4985+
**category_guid** | **str**| The unique id for a `category`. |
4986+
**user_guid** | **str**| The unique id for a `user`. |
4987+
4988+
### Return type
4989+
4990+
[**CategoryResponseBody**](CategoryResponseBody.md)
4991+
4992+
### Authorization
4993+
4994+
[basicAuth](../README.md#basicAuth)
4995+
4996+
### HTTP request headers
4997+
4998+
- **Content-Type**: Not defined
4999+
- **Accept**: application/vnd.mx.api.v1+json
5000+
5001+
5002+
### HTTP response details
5003+
5004+
| Status code | Description | Response headers |
5005+
|-------------|-------------|------------------|
5006+
**200** | OK | - |
5007+
5008+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
5009+
5010+
# **read_default_category**
5011+
> CategoryResponseBody read_default_category(category_guid, user_guid)
5012+
5013+
Read a default category
5014+
5015+
Use this endpoint to read the attributes of a default category.
5016+
5017+
### Example
5018+
5019+
* Basic Authentication (basicAuth):
5020+
5021+
```python
5022+
import time
5023+
import mx_platform_python
5024+
from mx_platform_python.api import mx_platform_api
5025+
from mx_platform_python.model.category_response_body import CategoryResponseBody
5026+
from pprint import pprint
5027+
# Defining the host is optional and defaults to https://api.mx.com
5028+
# See configuration.py for a list of all supported configuration parameters.
5029+
configuration = mx_platform_python.Configuration(
5030+
host = "https://api.mx.com"
5031+
)
5032+
5033+
# The client must configure the authentication and authorization parameters
5034+
# in accordance with the API server security policy.
5035+
# Examples for each auth method are provided below, use the example that
5036+
# satisfies your auth use case.
5037+
5038+
# Configure HTTP basic authorization: basicAuth
5039+
configuration = mx_platform_python.Configuration(
5040+
username = 'YOUR_USERNAME',
5041+
password = 'YOUR_PASSWORD'
5042+
)
5043+
5044+
# Enter a context with an instance of the API client
5045+
with mx_platform_python.ApiClient(configuration) as api_client:
5046+
# Create an instance of the API class
5047+
api_instance = mx_platform_api.MxPlatformApi(api_client)
5048+
category_guid = "CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874" # str | The unique id for a `category`.
5049+
user_guid = "USR-fa7537f3-48aa-a683-a02a-b18940482f54" # str | The unique id for a `user`.
5050+
5051+
# example passing only required values which don't have defaults set
5052+
try:
5053+
# Read a default category
5054+
api_response = api_instance.read_default_category(category_guid, user_guid)
5055+
pprint(api_response)
5056+
except mx_platform_python.ApiException as e:
5057+
print("Exception when calling MxPlatformApi->read_default_category: %s\n" % e)
5058+
```
5059+
5060+
48985061
### Parameters
48995062

49005063
Name | Type | Description | Notes

mx_platform_python/__init__.py

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

1212

13-
__version__ = "0.1.0"
13+
__version__ = "0.2.0"
1414

1515
# import ApiClient
1616
from mx_platform_python.api_client import ApiClient

0 commit comments

Comments
 (0)