Telegram Messenger

This forum is for eXpress++ general support.
Message
Author
User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Telegram Messenger

#1 Post by unixkd »

Hi ALL

Telegram Messenger is like whatsapp but with a comprehensive API. Has anybody integrate it to his/her application?

Thanks

Joe

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Telegram Messenger

#2 Post by c-tec »

Hello,
look at Pushbullet, works great and easy to implement, have most of the API functions in Xbase
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: Telegram Messenger

#3 Post by unixkd »

Thank you Rudolf

Can you please send me a sample code of how you implemented it in your application.

Thanks.

Joe

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Telegram Messenger

#4 Post by c-tec »

Hello Joe,
you find the docs at
https://docs.pushbullet.com/
Attached a sample, I would use Chilkat instead of OT4XB because it has much more possibilities, especially for json parsing. Have also for this code, but must bevore extract from other things. But you can see that is not so complicated.
regards
Rudolf


Code: Select all

function pushb_getdevices()
******************************************************************
local cUrl  := "https://api.pushbullet.com/v2/devices"
local aVars := {}
local cToken := dcc_iniread("FORMCOMMANDER.INI","PUSHBULLET","TESTTOKEN"),xRet
local oHttp := TServerXMLHTTPRequest():New()

aadd(aVars,"active")
aadd(aVars,"app_version")
aadd(aVars,"created")
aadd(aVars,"iden")
aadd(aVars,"manufacturer")
aadd(aVars,"model")
aadd(aVars,"modified")
aadd(aVars,"nickname")
aadd(aVars,"push_token")

xRet := oHttp:Open( "GET" , cUrl , .F.)
xRet := oHttp:lIgnoreCertAll := .T.
xRet := oHttp:SetRequestHeader( "Access-Token",  cToken )
xRet := oHttp:Send()
cc := oHttp:responseText
dcqdebug oHttp:status
oHttp:Release()
dcqdebug cc
prot("getdevices:" + CRLF + cc + CRLF,PUSHBULLETLOG)
prot("pretty:" + CRLF + json_pretty_out(cc) + CRLF,PUSHBULLETLOG)
aTmp := jsonreadblock(json_pretty_out(cc),,aVars)
//dc_arrayview(aTmp)
return .t.
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: Telegram Messenger

#5 Post by unixkd »

Thanks Rudolf

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Telegram Messenger

#6 Post by c-tec »

Hello Joe,
the json functions I can send you if needed.
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Telegram Messenger

#7 Post by bwolfsohn »

pushbullet looks interesting....

I'm wondering how you use it in your application...
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Telegram Messenger

#8 Post by c-tec »

Hello Brian,
I use it in my digital pen & paper and CRM software for some workflows to inform user about events and documents. The nice thing is that it also has addons for browser. Actually I have problems to send files, but should be no problem also.
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: Telegram Messenger

#9 Post by unixkd »

Great.

Pls send the json functions.

Joe

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Telegram Messenger

#10 Post by c-tec »

Hello Joe,
sent you a pm
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

Post Reply