Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.

Http API Client

Hi folks,

I am just wondering if there is an API client available for the Vanilla API in PHP, Python or Java?

Ultimately, if we had a PHP client, I might be looking to do something similar to this:

<?php

$vanillaClient = new \NameSpace\Client('Auth Token', 'Forum URL');
$someThread = $vanillaClient->getThread('threadId');
$someUser = $vanillaclient->getUser('userId');

// And so on so forth

Thank you.

Comments

  • charrondevcharrondev Application Developer (PHP, JS) Montreal Vanilla Staff

    We are taking steps that would put us closer in this direction. Currently one of the blockers for us has been issues with our OpenAPI spec. Once we've resolved some issues there I plan on investigating using OpenAPI codegen to generate API clients.

    However, this is not an immediate priority. If you wanted to help push this along faster, try to take the OpenAPI spec available from the /api/v2/openapi/v2 endpoint and run it through the swagger/openapi code generation tools.

    Reporting issues blocking those from working is the probably the fastest path forward here. If you do try that, I'd recommend working from the master or a release/2.8.dev.x branch, as we some OpenAPI validation issues that were fixed starting in 2.8.

    R_J
  • OK, thank you.

Sign In or Register to comment.