Skip to content

Latest commit

 

History

History
284 lines (191 loc) · 7.27 KB

NewsApi.md

File metadata and controls

284 lines (191 loc) · 7.27 KB

OpenAPI\Client\NewsApi

All URIs are relative to https://api.wall.et, except if the operation defines another base path.

Method HTTP request Description
archiveNewsArticle() DELETE /v2/news/{id} Archive news article
createNewsArticle() POST /v2/news Create news article
fetchAllNewsArticles() GET /v2/news/all Fetch all news articles
restoreNewsArticle() PATCH /v2/news/{id} Restore news article
updateNewsArticle() PUT /v2/news/{id} Update news article

archiveNewsArticle()

archiveNewsArticle($id): \OpenAPI\Client\Model\NewsArticle

Archive news article

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\NewsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$id = NULL; // mixed

try {
    $result = $apiInstance->archiveNewsArticle($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NewsApi->archiveNewsArticle: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id mixed

Return type

\OpenAPI\Client\Model\NewsArticle

Authorization

No authorization required

HTTP request headers

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

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

createNewsArticle()

createNewsArticle($wt_news_article_create_params): \OpenAPI\Client\Model\NewsArticle

Create news article

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\NewsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$wt_news_article_create_params = new \OpenAPI\Client\Model\WTNewsArticleCreateParams(); // \OpenAPI\Client\Model\WTNewsArticleCreateParams

try {
    $result = $apiInstance->createNewsArticle($wt_news_article_create_params);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NewsApi->createNewsArticle: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
wt_news_article_create_params \OpenAPI\Client\Model\WTNewsArticleCreateParams

Return type

\OpenAPI\Client\Model\NewsArticle

Authorization

No authorization required

HTTP request headers

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

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

fetchAllNewsArticles()

fetchAllNewsArticles($is_archive_included): mixed

Fetch all news articles

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\NewsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$is_archive_included = True; // bool

try {
    $result = $apiInstance->fetchAllNewsArticles($is_archive_included);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NewsApi->fetchAllNewsArticles: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
is_archive_included bool [optional]

Return type

mixed

Authorization

No authorization required

HTTP request headers

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

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

restoreNewsArticle()

restoreNewsArticle($id): \OpenAPI\Client\Model\NewsArticle

Restore news article

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\NewsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$id = NULL; // mixed

try {
    $result = $apiInstance->restoreNewsArticle($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NewsApi->restoreNewsArticle: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id mixed

Return type

\OpenAPI\Client\Model\NewsArticle

Authorization

No authorization required

HTTP request headers

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

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

updateNewsArticle()

updateNewsArticle($id, $wt_news_article_update_params): \OpenAPI\Client\Model\NewsArticle

Update news article

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\NewsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$id = NULL; // mixed
$wt_news_article_update_params = new \OpenAPI\Client\Model\WTNewsArticleUpdateParams(); // \OpenAPI\Client\Model\WTNewsArticleUpdateParams

try {
    $result = $apiInstance->updateNewsArticle($id, $wt_news_article_update_params);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NewsApi->updateNewsArticle: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id mixed
wt_news_article_update_params \OpenAPI\Client\Model\WTNewsArticleUpdateParams

Return type

\OpenAPI\Client\Model\NewsArticle

Authorization

No authorization required

HTTP request headers

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

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