How to make Telegram API call to `users.getUsers` - perl

I am using WWW::Telegram::BotAPI
From here I read I can get basic info for given user_id
How to accomplish this?
Next does not work:
$api->api_request( 'users.getUsers' ) # 404 Not Found
If this is not supported by module, may you please provide an example how to do this with curl

Got official answer: it is not supported yet
https://rt.cpan.org/Ticket/Display.html?id=136452

Related

A Translation command

I want to do a translation command. So when ppl willl type y!translate <text>, it will be translate to English language, and only.
Can I have a code for do that?
Thanks so much.
I cannot provide because it will be a big project you with code but maybe this is helpful.
Get a Google Translate API key:
https://cloud.google.com/translate
Read the Google Translate API documentation:
https://cloud.google.com/translate/docs/basic/setup-basic
I can recommend you to use axios.js for node.js API requests:
https://www.npmjs.com/package/axios
When a user types the command you'll need to do an API request and process the response and send it back in Discord.
If you would like to auto-detect the language you can take a look at this page:
https://cloud.google.com/translate/docs/advanced/detecting-language-v3
I hope this was helpful for you, if not please let me know!

Howto delete milestones using REST API in Gitlab ?

I could not find any talk about this feature in Gitlab documentation
I tried to do it, but got a 405 error code.
Is anybody knows how to do that ?
thanks.
Well, if it's not listed there, you can't remove it with API. But you can close the milestone with
PUT /projects/:id/milestones/:milestone_id
passing state_event as close.

Reposting via Soundcloud Python API

Is there any way to repost a track via the Soundcloud Python API? I am having a bit of trouble. I tried client.put('/me/track_reposts/trackID') but it gave me a 404 error. Did anybody have better luck?
Yes.
client.put('/e1/me/track_reposts/'+str(track.id))
It's that little 'e1' at the beginning that got me for the longest time.
Did you use post or put? Try put.
Ex.
Reposting
PUT https://api.soundcloud.com/me/track_reposts/159642137?client_id=b45b_
Removing Reposting
DELETE https://api.soundcloud.com/me/track_reposts/159642137?client_id=b45b_

iOS: Foursquare shout or creating event

I am working with foursquare a for the first time, having hard time with this: Is there any API from the foursquare that supports function to allow shout out? If there is can someone tell me the link. I am really stuck with this stuff..
there is a good example in github for this,hope that helps you. :
https://github.com/Constantine-Fry/Foursquare-iOS-API
This is latest and working FSQDemo works with iOS5 and Xcode4.2 tested. Please read Readme.md first, you need to create your application and put your clientid as mentioned in it.
When you run the application you can get check in and before you do that you have to click on obtain access token.
According to this A shout is Foursquare’s version of a status update or a tweet and from this forum discussion it is passing shout as parameter to url. So there may/must be a way from this sample as it allows check in.
Hope this helps.
Got it.. Thanks with this > https://github.com/baztokyo/foursquare-ios-api/blob/master/README.md

How do I use the Groups.pm in Request Tracker?

In lib\RT\CustomFieldValues\ there is the groups.pm file which is supposed to be an example of how to get data into a custom field, but how do I actually use that once I have written it? Does anyone have any documentation or a sample of this?
I have finally figured it out, to use the Groups.pm module you need to go to /opt/rt3/etc and edit the RT_SiteConfig.pm and add the line
Set(#CustomFieldValuesSources, "RT::CustomFieldValues::Groups");
Restart Apache and it will be available as a new field source.
I have written a blog post on doing this which also includes details on how to build your own module in case anyone is interested in doing this: AD Lookup Control in Request Tracker