Giter VIP home page Giter VIP logo

lisbon-challenge's Introduction

Lisbon challenge - python examples

API URL (with all endpoints and content types)

http://clean-sprint-app.4thoffice.com/api

Data contract

XSD format: https://github.com/4thOffice/4thOfficeClient/blob/master/src/DataContract/ApiDataContract.xsd

TS format: https://github.com/4thOffice/4thOfficeClient/blob/master/src/DataContract/ApiDataContract.ts

Content types

4th Office API is build in a way, that you can request different content types on the same endpoint. For example if I want to get a user's settings, I can specify which types of settings I want. I would always do a GET request to /user/settings endpoint, but if I wanted general settings, I would set the Accept HTTP header as application/vnd.4thoffice.user.settings-4.0+json and if I wanted settings for notifications, I would set the Accept HTTP header as application/vnd.4thoffice.user.settings.notification-5.15+json. The same goes for POST, PUT and DELETE requests. There you might need to also set the Content-Type HTTP header.

SDKs

We offer you C# and Python SDKs. If you will be using any other programming language, raw HTTP requests are still possible (also included in examples).

Python SDK is available through pip install SnappEmailApiClient

C# SDK is available to download in the dotNetExamples/external folder.

Getting started:

  1. In your desktop app go to Development->Change API base->Clean sprint. This will connect you to sandbox environment. Login with your Gmail or Exchange account
  2. Go to https://clean-sprint-app.4thoffice.com/devconsole/login and login with the same account as in step 1 (we do not save your password and it is a sandbox environment so you can put in a random password)
  3. To create new application (integration) click on Add new..
  4. Enter your app name.
  5. If you will use actions enter the URL of your server (can be done later)
  6. Add webhooks for endpoint (if you are using actions, can also be done later):
    • POST action
  7. Look at examples in this repository (every example has HTTP, Python SDK example and C# example)
  8. If you will need to access other users (e.g. impersonate them), send your API KEY to Kaja

Impersonation

Since you are using a sandbox environment, we allow impersonation of users. That means you can create posts, get the content of those users etc. To use impersonation ALWAYS set the X-Impersonate-User HTTP header. The SDKs do that for you, if you pass it as a parameter (look at examples)

lisbon-challenge's People

Contributors

gzgajnar avatar markot4o avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

denkomanceski

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.