Skip to content

Commit

Permalink
5.8.1103
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepsinn committed Nov 4, 2017
1 parent 2dbfadc commit 83d7676
Show file tree
Hide file tree
Showing 463 changed files with 72,078 additions and 33,378 deletions.
305 changes: 145 additions & 160 deletions README.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions autoload.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

/**
* QuantiModo
* quantimodo
*
* Welcome to QuantiModo API! QuantiModo makes it easy to retrieve normalized user data from a wide array of devices and applications. [Learn about QuantiModo](https://quantimo.do) or contact us at <[email protected]>. Before you get started, you will need to: * Sign in/Sign up, and add some data at [https://app.quantimo.do/api/v2/account/connectors](https://app.quantimo.do/api/v2/account/connectors) to try out the API for yourself * Create an app to get your client id and secret at [https://app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps) * As long as you're signed in, it will use your browser's cookie for authentication. However, client applications must use OAuth2 tokens to access the API. ## Application Endpoints These endpoints give you access to all authorized users' data for that application. ### Getting Application Token Make a `POST` request to `/api/v2/oauth/access_token` * `grant_type` Must be `client_credentials`. * `clientId` Your application's clientId. * `client_secret` Your application's client_secret. * `redirect_uri` Your application's redirect url. ## Example Queries ### Query Options The standard query options for QuantiModo API are as described in the table below. These are the available query options in QuantiModo API: <table> <thead> <tr> <th>Parameter</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>limit</td> <td>The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.</td> </tr> <tr> <td>offset</td> <td>Suppose you wanted to show results 11-20. You'd set the offset to 10 and the limit to 10.</td> </tr> <tr> <td>sort</td> <td>Sort by given field. If the field is prefixed with '-', it will sort in descending order.</td> </tr> </tbody> </table> ### Pagination Conventions Since the maximum limit is 200 records, to get more than that you'll have to make multiple API calls and page through the results. To retrieve all the data, you can iterate through data by using the `limit` and `offset` query parameters.For example, if you want to retrieve data from 61-80 then you can use a query with the following parameters, `/v2/variables?limit=20&offset=60` Generally, you'll be retrieving new or updated user data. To avoid unnecessary API calls, you'll want to store your last refresh time locally. Initially, it should be set to 0. Then whenever you make a request to get new data, you should limit the returned results to those updated since your last refresh by appending append `?lastUpdated=(ge)&quot2013-01-D01T01:01:01&quot` to your request. Also for better pagination, you can get link to the records of first, last, next and previous page from response headers: * `Total-Count` - Total number of results for given query * `Link-First` - Link to get first page records * `Link-Last` - Link to get last page records * `Link-Prev` - Link to get previous records set * `Link-Next` - Link to get next records set Remember, response header will be only sent when the record set is available. e.g. You will not get a ```Link-Last``` & ```Link-Next``` when you query for the last page. ### Filter operators support API supports the following operators with filter parameters: <br> **Comparison operators** Comparison operators allow you to limit results to those greater than, less than, or equal to a specified value for a specified attribute. These operators can be used with strings, numbers, and dates. The following comparison operators are available: * `gt` for `greater than` comparison * `ge` for `greater than or equal` comparison * `lt` for `less than` comparison * `le` for `less than or equal` comparison They are included in queries using the following format: `(<operator>)<value>` For example, in order to filter value which is greater than 21, the following query parameter should be used: `?value=(gt)21` <br><br> **Equals/In Operators** It also allows filtering by the exact value of an attribute or by a set of values, depending on the type of value passed as a query parameter. If the value contains commas, the parameter is split on commas and used as array input for `IN` filtering, otherwise the exact match is applied. In order to only show records which have the value 42, the following query should be used: `?value=42` In order to filter records which have value 42 or 43, the following query should be used: `?value=42,43` <br><br> **Like operators** Like operators allow filtering using `LIKE` query. This operator is triggered if exact match operator is used, but value contains `%` sign as the first or last character. In order to filter records which category that start with `Food`, the following query should be used: `?category=Food%` <br><br> **Negation operator** It is possible to get negated results of a query by prefixed the operator with `!`. Some examples: `//filter records except those with value are not 42 or 43`<br> `?value=!42,43` `//filter records with value not greater than 21`<br> `?value=!(ge)21` <br><br> **Multiple constraints for single attribute** It is possible to apply multiple constraints by providing an array of query filters: Filter all records which value is greater than 20.2 and less than 20.3<br> `?value[]=(gt)20.2&value[]=(lt)20.3` Filter all records which value is greater than 20.2 and less than 20.3 but not 20.2778<br> `?value[]=(gt)20.2&value[]=(lt)20.3&value[]=!20.2778`<br><br>
* We make it easy to retrieve and analyze normalized user data from a wide array of devices and applications. Check out our [docs and sdk's](https://github.com/QuantiModo/docs) or [contact us](https://help.quantimo.do).
*
* OpenAPI spec version: 2.0
* OpenAPI spec version: 5.8.100414
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quantimodo/quantimodo-sdk-php",
"version": "5.0.4",
"version": "5.8.1103",
"description": "",
"keywords": [
"swagger",
Expand Down
Loading

0 comments on commit 83d7676

Please sign in to comment.