(First, I want to note that this didn't answer my question: How to get the latest/new messages from Telegram API)
I am building a history object to poll the 20 latest messages from a channel/chat:
get_history = GetHistoryRequest(
peer=input_peer,
offset_id=0,
offset_date=None,
add_offset=0,
limit=20,
max_id=0,
min_id=0,
hash=0
)
The API here:
https://core.telegram.org/api/offsets
mentions max_date and min_date.
I imagine to get the latest messages, I should use limit=[number], offset_date=[same_number] and max_date be the date at the moment. However, I can't get from the API documentation how "max_date" should be represented. Any ideas how, and whether I am correct in my assumptions in getting the latest 20 messages?
This is also useful to have around: https://core.telegram.org/method/messages.getHistory
Related
I have a project where I am making a virtual phone and currently I need to have a list of people i've messaged. Basically the list you see before going into a private chat with X person.
My problem is currently I can't seem to find the solution to only get latest message I have with X person.
The issue with this is that if I've sent a message to X person and the X person have sent a message to me, i basically get 2 messages in the database when trying to pull out the information, where I only need to get the latest.
This is what I get when doing following and I ALMOST get what I want.
In JQUERY if I remove all where sender = my phone number i would run into a different issue.
https://i.imgur.com/JJzRl6M.png
I've tried following sql
SELECT msg_id, sender, receiver, sender_msg, receiver_read, MAX(msg_date)
FROM nl_phone_messages WHERE sender = '545-3169' OR receiver = '545-3169' GROUP BY sender, receiver
In this case you have to look at the numbers 114-5437 and 545-3169
msg_id 5 should not be in this list as it's not the latest message with this person where msg_id 24 is the latest with that specific person
https://i.imgur.com/WTzRmYv.png
I hope you understand my issue, ask if got any question - Thank you!
I am trying to get the information about the users that have Activated Office 365 using:
/beta/reports/getOffice365ActivationsUserDetail?$format=text/csv
I am getting an error:
{
"code": "UnknownTenantId",
"message": "We do not recognize this tenant ID {MyTenantID}. Please double-check the tenant ID and try again."
}
The Read.Report.All permission is already assigned, and I am able to get other information from O365 using the Graph API.
Any suggestions how to resolve this issue?
You shouldn't be using the /beta/ release as this report is available in /v1.0/ and returns test/csv by default.
You also need to provide a valid period to the getOffice365ActiveUserDetail endpoint:
Specifies the length of time over which the report is aggregated. The supported values for {period_value} are: D7, D30, D90, and D180. These values follow the format Dn where n represents the number of days over which the report is aggregated.
For example, to get details for users active in past 7 days you would request:
https://graph.microsoft.com/v1.0/reports/getOffice365ActiveUserDetail(period='D7')
i am receive only 18 orders and also if i set the limit property I get only 18 orders back.
admin/orders.json?limit=50
And if i use the page property
admin/orders.json?limit=50&page=2
it returns empty orders.
{"orders":[]}
After some more searching i found out that this works
admin/orders/search.json?query=&limit=122
but is not mentioned in the API, and is not implemented in the Python SDK
In case anyone cares, you can find this API reference here : http://docs.shopify.com/api/order
The Google Custom Search API requires the use of an API key, I have get from the Google APIs console. The API provides 100 search queries per day for free. I want to more,so I have signed up for billing in the console and succeed.I can set the requests/day,defalut 1000 requests/day.But the total results are still 100,I show 10 in one page,so I can get 10 pages.
Billing solve the querys per day,but not the total results.The document does not explain clearly.What should i do to solve the results problem.Does XML API have the same problem? Must I Replace the JSON API by XML API?
another year passed... Limits are the same =((
Google forces us to use multiple accounts to get complete search results.
Use a query per day/week/month.
Or you can sort huge result array by publish date. And when '100-items' limit is reached you should execute new request with excluding first items by applying "the lowest(or the highest) possible value" condition on publish date.
btw, using webbrowser you could set 100 results per page. So total count of result items is 1000 per query. Web crawling would be helpful=))))
be happy!
Using the Box 1.0 REST API, I am trying to work with the functions in SOAP UI.
The API doc for get_managed_users with user_id=12345 (internal id retrieved with get_user_id call correctly) is returning all the users. The docs say that would be the case if you do not specify a user_id value. But my full command is: (Token and API key changed to protect the clueless)
https://www.box.com/api/1.0/rest?user_id=27360&auth_token=blahbalhblah1234&action=get_managed_users&api_key=someKeyYouShouldNotSee
Now I could work with the complete result list, but that won't scale as we get thousands of users into the system.
I can make a call with edit_managed_user, using the same user_id value and the change is reflected in the UI, and in the next get_managed_users call. Thus I do have the correct user_id value, I would so assume.
I tried testuser#gmail.com as the user_id value as well, and get the entire list back. This leads me to believe that somehow I am sending user_id wrong, but I just do not see it.
Any hints? Why, with what seems like a valid user_id value is it acting like it is absent or incorrect?
Most likely you have either called this method with an invalid user_id, or one that is not in your set of managed users. Can you double check that the user comes back in your list of already managed users?