Coder Social home page Coder Social logo

helpscout-docs-api-php's Introduction

helpscout-docs-api-php Build Status

PHP Wrapper for the Help Scout Docs API. More information about Docs API: http://developer.helpscout.net/docs-api/.

Inspired and followed by original https://github.com/helpscout/helpscout-api-php repository.

Requirements

  • PHP >= 7.3.0

Installation

This will install latest 2.* version:

composer require m1x0n/helpscout-docs-api-php

Previous versions for "php":">= 5.5" are also available and could be installed in following way:

composer require m1x0n/helpscout-docs-api-php:^1

Example Usage:

require_once __DIR__ . '/../vendor/autoload.php';

use HelpScoutDocs\DocsApiClient;

$docsApiClient = new DocsApiClient();
$docsApiClient->setApiKey('your-api-key');

$collections = $docsApiClient->getCollections();

Docs API Client Endpoints Methods

Collections

  • getCollections($page = 1, $siteId = '', $visibility = 'all', $sort = 'order', $order = 'asc')
  • getCollection($collectionIdOrNumber)
  • createCollection(Collection $collection, $reload = false)
  • updateCollection(Collection $collection, $reload = false)
  • deleteCollection($collectionId)

Categories

  • getCategories($collectionId, $page = 1, $sort = 'order', $order = 'asc')
  • getCategory($categoryIdOrNumber)
  • createCategory(Category $category, $reload = false)
  • updateCategory(Category $category, $reload = false)
  • updateCategoryOrder($collectionId, array $categories)
  • deleteCategory($categoryId)

Articles

  • getArticles($categoryId, $page = 1, $status = 'all', $sort = 'order', $order = 'asc', $pageSize = 50) Deprecated. Will be removed soon.
  • getArticlesForCategory($categoryId, $page = 1, $status = 'all', $sort = 'order', $order = 'asc', $pageSize = 50)
  • getArticlesForCollection($collectionId, $page = 1, $status = 'all', $sort = 'order', $order = 'asc', $pageSize = 50)
  • searchArticles($query = '*', $page = 1, $collectionId = '', $status = 'all', $visibility = 'all')
  • getRelatedArticles($articleId, $page = 1, $status = 'all', $sort = 'order', $order = 'desc')
  • getRevisions($articleId, $page = 1)
  • getArticle($articleIdOrNumber, $draft = false)
  • getRevision($revisionId)
  • createArticle(Article $article, $reload = false)
  • updateArticle(Article $article, $reload = false)
  • uploadArticle(UploadArticle $uploadArticle, $reload = false)
  • updateViewCount($articleId, $count = 1)
  • deleteArticle($articleId)
  • saveArticleDraft($articleId, $text)
  • deleteArticleDraft($articleId)

Sites

  • getSites($page = 1)
  • getSite($siteId)
  • createSite(Site $site, $reload = false)
  • updateSite(Site $site, $reload = false)
  • deleteSite($siteId)

Assets

  • createArticleAsset(ArticleAsset $articleAsset)
  • createSettingsAsset(SettingsAsset $settingsAsset)

Redirects

  • getRedirects($siteId)
  • getRedirect($redirectId)
  • findRedirect($url, $siteId)
  • createRedirect(Redirect $redirect, $reload = false)
  • updateRedirect(Redirect $redirect, $reload = false)
  • deleteRedirect($redirectId)

helpscout-docs-api-php's People

Contributors

adammeyer avatar coffeeneer avatar jamesckemp avatar m1x0n avatar maxgfeller avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.