Skip to content

Instantly share code, notes, and snippets.

@sdieunidou
Last active May 1, 2019 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sdieunidou/97ae6e64c5861256a76b3d6450c8daec to your computer and use it in GitHub Desktop.
Save sdieunidou/97ae6e64c5861256a76b3d6450c8daec to your computer and use it in GitHub Desktop.
hytale-api.php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\ArticlesApi();
try {
// get latest articles
$result = $apiInstance->getArticles();
print_r($result);
// show article
$slug = "creating-creature-sounds-for-hytale"; // string | Slug of article
$result = $apiInstance->getArticleBySlug($slug);
print_r($result);
} catch (Exception $e) {
printf("Exception when calling ArticlesApi: %s\n", $e->getMessage());
}
@sdieunidou
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment