Trend


Receiving trend report for selected date range


Request

GET http://api.truesocialmetrics.com/gamma/trend/f84b188cdb114f7f67428c5c54ba5660?from=1392029313&to=1392634103&source=twitter&aggregation=day&api_user=x@x.com&api_key=2999cccf4896592ebafc8cecdee529
or the same with CURL
curl http://api.truesocialmetrics.com/gamma/trend/f84b188cdb114f7f67428c5c54ba5660?from=1392029313&to=1392634103&source=twitter&aggregation=day&$TT_AUTH
f84b188cdb114f7f67428c5c54ba5660 - account id, from Account list
twitter - unique source id, from Source list
from=1392029313 to=1392634103 - daterange for analyze in unix timestamp format (notice: from < to).
aggregation=day - not required paramenter aggregation period by default "day", also available "week", "month".

"month" aggregation works properly with variable month length, for example in Febuary it's 28 days (depends on year), in July - 31.

Insted of using from:to for daterange you can use string representation from_str:to_str
1. YYYYMMDD format e.q. "20140730"
2. Mocks - "today", "yesterday", "monday", "april"
3. Shift pointers - "last monday", "last friday", "-1 month", "-2 weeks", "-4 days"

GET http://api.truesocialmetrics.com/gamma/trend/f84b188cdb114f7f67428c5c54ba5660?from_str=-1%20month&to_str=yesterday&source=twitter&api_user=x@x.com&api_key=2999cccf4896592ebafc8cecdee529

Response

Data is not ready yet, you can re-call api in 2-5 seconds.
{
    "status": "in process",
    "id": "f84b188cdb114f7f67428c5c54ba5660",
    "response": []
}

Analyzing is done.
{
    "status": "ok",
    "id": "f84b188cdb114f7f67428c5c54ba5660",
    "response": [
        {
            from: 1407110400,
            to: 1407196800,
            posts: 1,
            comments: 0,
            shares: 0,
            favorites: 73,
            followers: 1651061
        }
    ]
}