Is it possible to get number of active connections with Pusher from API - pusher

Is it possible to get number of active connections with Pusher (http://pusher.com/) from the API?
Can't find it in the their Python server library they're supporting. I can see it on the stats page in their web based dashboard though, but I want to present it to my users in the browser.

Looks like there's a subscription_count attribute to the get-channel method in the REST API:
http://pusher.com/docs/rest_api#method-get-channel
but you will need to get special access:
[BETA] Number of connections currently subscribed to this channel. This attribute is not available by default; please contact support#pusher.com if you would like to beta test this feature.

Related

How to connect an azure logic app to a shared calendar

I am creating a countdown api, it's almost embarrassingly simple. When an http request is received, get the events from a calendar, cut the response down a bit (filter) then return the number of days until the next event (js). (I am also trying to do this with a function app, but got stuck here)
I can connect to one of my own calendars without any problems, but when I try to connect to a shared calendar, I have no luck. I can access the shared calendar using the graph explorer with this url: https://graph.microsoft.com/v1.0/users/calendarName#whereIwork.com.au/events?$select=subject,start So I know that part of the system works.
I've tried several options for an ID, including the ID from the graph explorer
"id": "AAMkADljMGQ0ZjNlLTY1MDktNGFmZi05OTBlLWQyNjE1ZjVlNzUxOQBGAABAAABvxqd01Z8OTK1ajR2m-ahiBwAlvPDp3V3YTK9QFfbU2TzGAABAAAEGAAAlvPDp3V3YTK9QFfbU2TzGAABAABHZAAA=",
The name of the calendar, the name with users/ prepended, and a few other versions:
What is the correct way to connect to this type of calendar?
You can use API request to get all events you want too, try the action below :
For how to get app id and app secret , pls refer to my previous post for you .

How do i fetch only internal messages from O365 using Graph API

I wan't to fetch only messages that are only internal to organization.
Right now the way i see is fetch domains first then for each message see if from/sender domain belongs to that message , based on that differentiate.
But this is lengthy process and not a foolproof technique.
Is there any GRAPH API query i can use which readily provides this ?
It does not apear that the REST API queries for Office 365 includes this information directly in the messages. From the Version 2.0 And the Beta this is not included in message output.
However, it looks like you might be able to get it from the REST API via the headers.
Try the following query:
https://graph.microsoft.com/beta/me/messages?$select=internetMessageHeaders&$top=1
This takes top one messages and shows you the email header of the message.
In the header look for X-OriginatorOrg. The value should be the main domain of your organisation.
Alternatively you can look at the X-MS-Exchange-Organization-MessageDirectionalityheader. If the value here is Originating it should come from inside your own organisation.

Where I can see list of my requests?

I just can see the list of my follows and followed by https://api.instagram.com/v1/users/self/follows?access_token=ACCESS-TOKEN and https://api.instagram.com/v1/users/self/followed-by?access_token=ACCESS-TOKEN endpoints or in an official instagram application for android (version 6.11.2). Also I can see the requests to me from another accounts by https://api.instagram.com/v1/users/self/requested-by?access_token=ACCESS-TOKEN endpoint or also in the application. But I can't get the list of my own pending requests to people who doesn't want see me in his friendlist.
How can I see the list of my pending requests to people which is not my follows by the API or an official instagram application for android?
P.S. Sorry for my bad English.

Enable user to send text to specific Gmail contacts

In our website, we need to achieve a seemingly simple task: Enable the user to send a specific text to all or some of his/her Gmail contacts (including contact selection).
We don't actually need the contact data itself. We prefer some kind of "Gmail Plugin" (if there is one) that asks the user to login and does all the work. Alas, we couldn't find any.
We did find several different Google APIs related to this task. Some of them seem to give us contacts data. Others seem to handle sending email:
There is "Contacts API" under
https://developers.google.com/google-apps/contacts/v3/...
There is "Contacts Service" under
https://developers.google.com/apps-script/reference/contacts/...
There is "Gmail Service" under
https://developers.google.com/apps-script/reference/gmail/...
There is "Gmail Platform Integration" under
https://developers.google.com/gmail/...
Each of the above looks different and there seems to be much overlapping between them.
So what is the recommended method to achieve our original task? Is there a plugin that does it all? If not - should we use separate APIs for getting the contacts data and sending the emails, or are there Google APIs that combine both sub-tasks? In case those are separate tasks - is it possible to email via Gmail, or are there other recommended services for the email sending part?
To directly answer your question: you must use the first API you pointed, Contacts API under https://developers.google.com/google-apps/contacts/v3/.
Basically, you want to use the Google Contacts API with OAuth2 authentication in your website: user will be prompted by Google to allow your website to read user contacts.
First, read a bit about OAuth2 authentication flows here: http://alexbilbie.com/2013/02/a-guide-to-oauth-2-grants/
Second step: register your app on Google Console and get your key/pass for the Contacts API (you'll need contacts.readonly permission): https://console.developers.google.com
Then, as you'll use the OAuth2 for Web Servers, check this Google documentation: https://developers.google.com/accounts/docs/OAuth2WebServer
Alternatively, you can use third part libraries to easily import contacts to your website. There are free libraries, like PHP OpenInviter.org, Ruby OmniAuth gem, and paid alternatives, like CloudSponge.com (multi-language).
Disclaimer: I work for CloudSponge.com.
You could achieve this as you say with Google APIs and a Chrome Extension for example.
The user can add a Chrome Extension from the Chrome Webstore. The Extension will provide the user with a user interface to allow them to compose their message and send to the selected contacts.
The users contacts can be retrieved with the Google Contacts API.
The message can be sent to the selected contacts with the Gmail API.
There is a lot of documentation and examples for all of the above which together will give you what you want.
Depending on how much use this is going to get, you could use a contextual gadget which is browser agnostic - but visible in all emails in Gmail.
This is wrong the idea is to post the text to buffer a and submit pointer to array on buffet a and copy it to class b pointer a 0 than release the array and buffer so new allocation can be done

Cisco call manager api to conference a device

I'm trying to implement some click to dial functionality as follows:
A user finds a number on a webpage (say employee extension)
Clicking that extension will dial a phone number that I've picked
Upon answering that call, I am immediately "conferenced" into
calling the number I actualy wanted to dial.
I've done something very similar using a Twilio API but want to use our corporate Cisco Call Manager capabilities instead of paying per minute for this functionality.
The WebDialerSOAP doesn't seem to be able to give me this functionality. I think doing a conference would work but can't find anything to do that. Possibly an open source call manager wrapper?
why not a FreeSWITCH server alongside the CUCM? It can set up conferences, and it's one of themost programmable products with as much control over API as you want.
It has also an RTMP module, so you can actually run a Flash-based softphone out of your browser
Use TAPI3 or JTAPI
Connect the code using TSP, and Application user
use CreateCall function to the number from HTML page with implementing the trigger.
use CreateCall to the other phone.
use Finish(FINISH_MODE.FM_ASCONFERENCE) to complete conference.

Resources