Skip to content

Latest commit

 

History

History
361 lines (242 loc) · 10.1 KB

File metadata and controls

361 lines (242 loc) · 10.1 KB

wallet.NewsApi

All URIs are relative to https://api.wall.et

Method HTTP request Description
archive_news_article DELETE /v2/news/{id} Archive News & Blog post
create_news_article POST /v2/news Create News & Blog post
fetch_all_news_articles GET /v2/news/all Get all News & Blog posts
restore_news_article PATCH /v2/news/{id} Restore News & Blog post
update_news_article PUT /v2/news/{id} Update News & Blog post

archive_news_article

NewsArticle archive_news_article(id)

Archive News & Blog post

Example

import wallet
from wallet.models.news_article import NewsArticle
from wallet.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.wall.et
# See configuration.py for a list of all supported configuration parameters.
configuration = wallet.Configuration(
    host = "https://api.wall.et"
)


# Enter a context with an instance of the API client
with wallet.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = wallet.NewsApi(api_client)
    id = 'id_example' # str | 

    try:
        # Archive News & Blog post
        api_response = api_instance.archive_news_article(id)
        print("The response of NewsApi->archive_news_article:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NewsApi->archive_news_article: %s\n" % e)

Parameters

Name Type Description Notes
id str

Return type

NewsArticle

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
401 Authentication Failed -
422 Validation Failed -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_news_article

NewsArticle create_news_article(wt_news_article_create_params)

Create News & Blog post

Example

import wallet
from wallet.models.news_article import NewsArticle
from wallet.models.wt_news_article_create_params import WTNewsArticleCreateParams
from wallet.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.wall.et
# See configuration.py for a list of all supported configuration parameters.
configuration = wallet.Configuration(
    host = "https://api.wall.et"
)


# Enter a context with an instance of the API client
with wallet.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = wallet.NewsApi(api_client)
    wt_news_article_create_params = wallet.WTNewsArticleCreateParams() # WTNewsArticleCreateParams | 

    try:
        # Create News & Blog post
        api_response = api_instance.create_news_article(wt_news_article_create_params)
        print("The response of NewsApi->create_news_article:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NewsApi->create_news_article: %s\n" % e)

Parameters

Name Type Description Notes
wt_news_article_create_params WTNewsArticleCreateParams

Return type

NewsArticle

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
401 Authentication Failed -
422 Validation Failed -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

fetch_all_news_articles

object fetch_all_news_articles(is_archive_included=is_archive_included)

Get all News & Blog posts

Example

import wallet
from wallet.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.wall.et
# See configuration.py for a list of all supported configuration parameters.
configuration = wallet.Configuration(
    host = "https://api.wall.et"
)


# Enter a context with an instance of the API client
with wallet.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = wallet.NewsApi(api_client)
    is_archive_included = True # bool |  (optional)

    try:
        # Get all News & Blog posts
        api_response = api_instance.fetch_all_news_articles(is_archive_included=is_archive_included)
        print("The response of NewsApi->fetch_all_news_articles:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NewsApi->fetch_all_news_articles: %s\n" % e)

Parameters

Name Type Description Notes
is_archive_included bool [optional]

Return type

object

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
401 Authentication Failed -
422 Validation Failed -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

restore_news_article

NewsArticle restore_news_article(id)

Restore News & Blog post

Example

import wallet
from wallet.models.news_article import NewsArticle
from wallet.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.wall.et
# See configuration.py for a list of all supported configuration parameters.
configuration = wallet.Configuration(
    host = "https://api.wall.et"
)


# Enter a context with an instance of the API client
with wallet.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = wallet.NewsApi(api_client)
    id = 'id_example' # str | 

    try:
        # Restore News & Blog post
        api_response = api_instance.restore_news_article(id)
        print("The response of NewsApi->restore_news_article:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NewsApi->restore_news_article: %s\n" % e)

Parameters

Name Type Description Notes
id str

Return type

NewsArticle

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
401 Authentication Failed -
422 Validation Failed -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_news_article

NewsArticle update_news_article(id, wt_news_article_update_params)

Update News & Blog post

Example

import wallet
from wallet.models.news_article import NewsArticle
from wallet.models.wt_news_article_update_params import WTNewsArticleUpdateParams
from wallet.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.wall.et
# See configuration.py for a list of all supported configuration parameters.
configuration = wallet.Configuration(
    host = "https://api.wall.et"
)


# Enter a context with an instance of the API client
with wallet.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = wallet.NewsApi(api_client)
    id = 'id_example' # str | 
    wt_news_article_update_params = wallet.WTNewsArticleUpdateParams() # WTNewsArticleUpdateParams | 

    try:
        # Update News & Blog post
        api_response = api_instance.update_news_article(id, wt_news_article_update_params)
        print("The response of NewsApi->update_news_article:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NewsApi->update_news_article: %s\n" % e)

Parameters

Name Type Description Notes
id str
wt_news_article_update_params WTNewsArticleUpdateParams

Return type

NewsArticle

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
401 Authentication Failed -
422 Validation Failed -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]