Git Product home page Git Product logo

helpscout-api-python's Introduction

helpscout-api-python

Python wrapper for the Help Scout API

Installation:

git clone [email protected]/mccannm11/helpscout-api-python cd helpscout-api-python && python setup.py install

Example Usage: API

import helpscout

client = helpscout.Client()
client.api_key = "your-api-key-here"

mailboxes = client.mailboxes()
folders = client.folders(mailboxes.items[0].id)
for f in folders:
    #do things here


customer = client.customer(customer-id-here)
if customers.socialProfiles != None:
    for s in customers.socialProfiles:
         #do things

Field Selectors

Field selectors are given as a list of Strings. When field selectors are used, the appropriate object is created with the fields provided.

ApiClient Methods

Each method can accept a field selector as an addition parameter.

Mailboxes

  • mailboxes()
  • mailbox(int mailbox_id)

Folders

  • folders(int mailbox_id)

Conversations

  • conversations_for_folders(int mailbox_id, int folder_id)
  • conversations_for_mailbox(int mailbox_id)
  • conversations_for_customerByMailbox(int mailbox_id, int customer_id)
  • conversation(int conversation_id)

Attachments

  • attachment_data(int attachment_id)

Customers

  • customers()
  • customer(int customer_id)

Users

  • users()
  • users_for_mailbox(int mailbox_id)
  • user(int user_id)

Search

  • search()
  • search(query="subject:foo")
  • search(query="subject:foo", sort_by="number", sort_order="asc")

See full syntax for query parameter here: http://developer.helpscout.net/help-desk-api/search/conversations/

Pagination

Multiple calls to the above calls that support pagination will return subsequent pages.

  • clearstate() - to clear the pagination couters and start from page 1 again.
  • clearstate(str 'function') - to clear the pagination couter for a given function, e.g. "folders" You could set the starting page by passing in page=N as a keyword arg.

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.