Followed by Instagram API request - instagram-api

I'm attempting to request the information from Instagram of my followers.
I'm getting a 200 code but no information. Not having this problem with any other requests relating to user or media, just followers. Is there something obvious I am missing?
{
pagination: { },
meta: {
code: 200
},
data: [ ]
}

Related

How to query pageviews in nodejs #google-analytics/data library

Does anyone know how to query pageviews in the google analytics library for node? Can't seem to find any documentation on which "metric" to query for that:
async function runReport() {
const [response] = await analyticsDataClient.runReport({
property: `properties/${propertyId}`,
dimensions: [
{
name: 'date',
},
],
metrics: [
{
name: 'pageViews',
}
],
dateRanges: [
{
startDate: '7daysAgo',
endDate: 'today',
},
],
});
console.log('Report result:');
response.rows.forEach(row => {
console.log(row.dimensionValues[0], row.metricValues[0]);
});
}
runReport();
Which is giving me an error Field pageViews is not a valid metric.
Not sure if anyone is aware of a list that outlines the valid metrics you can query with this library, I wasn't able to find one. I can get the activeUsers just fine so I know the code and configuration is working
Found it about 5 mins after I posted this question - go figure. Hope this helps someone: https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics

Google Reports Push notification not working

i am trying to get events of google meet for one of my project. as per discussed in documentation while subscribing the channel you should receive status code 200. which means you have successfully subscribed the channel and now you can get specified events.
{
"kind": "api#channel",
"id": "2_3_1649922664979",
"resourceId": "2o-e8ddqUdzRvmQ96lTxgh3SWkM",
"resourceUri": "https://admin.googleapis.com/admin/reports/v1/activity/users/daud.rauf%40venturenox.com/applications/meet?alt=json&eventName=call_ended&orgUnitID",
"token": "{\"user_id\":3,\"tenant_id\":2}",
"expiration": "1649944266000"}
i got 200 with response above but didn't receiving any further events. Detailed code is...
const data = await google
.admin({
version: 'reports_v1',
auth: google_client,
})
.activities.watch({
userKey: 'all',
applicationName: 'meet',
eventName: 'call_ended',
// maxResults: 10,
requestBody: {
id: watchId, // it is unique
token: JSON.stringify(params),
type: 'web_hook',
address: process.env.GOOGLE_REPORTS_WATCH_URL,
kind: 'api#channel',
},
});

Google Contacts API learn is contact google+ or not

I'm using Google Contacts API to get user's contacts in my NodeJS app and I need to check, has contact google+ or not, but I can't find a way to do it in docs. Currently I'm receiving response from API that looks like this:
{ id: { '$t': 'http://www.google.com/m8/feeds/contacts/ex%40domain.com/base/40411dcf8aeb5354' },
updated: { '$t': '2016-08-12T08:03:22.026Z' },
category:
[ { scheme: 'http://schemas.google.com/g/2005#kind',
term: 'http://schemas.google.com/contact/2008#contact' } ],
title: { type: 'text', '$t': 'TestGoogleContact' },
link:
[ { rel: 'http://schemas.google.com/contacts/2008/rel#edit-photo',
type: 'image/*',
href: 'https://www.google.com/m8/feeds/photos/media/ii%40risingapp.com/40411dcf8aeb5354/1B2M2Y8AsgTpgAmY7PhCfg' },
{ rel: 'self',
type: 'application/atom+xml',
href: 'https://www.google.com/m8/feeds/contacts/ii%40risingapp.com/full/40411dcf8aeb5354' },
{ rel: 'edit',
type: 'application/atom+xml',
href: 'https://www.google.com/m8/feeds/contacts/ii%40risingapp.com/full/40411dcf8aeb5354/1470989002026004' } ],
'gd$email':
[ { address: 'testcontact#somedomain.com',
primary: 'true',
rel: 'http://schemas.google.com/g/2005#home' } ] }
Contacts API pre-dates Google+ so profile information is not available. A feature was added later to show just the G+ photo from the profile if a the user set one, which could be a hacky/flakey heuristic to check for a profile. However, you can easily get this information by using the People API instead, which joins G+ profile information onto contacts and will likely replace the Contacts API eventually: https://developers.google.com/people/

Resolve issue in jira by using rest api

Can I resolve the issue in JIRA?
I made some trials with REST API as;
var url = "https://hibernate.atlassian.net/rest/api/2/issue/WEBSITE-1/transitions";
var message = [{
"update": {
"comment": [
{
"add": {
"body": "some text for body"
}
}
]
},
"fields": {
"assignee": {
"name": "name1"
},
"resolution": {
"name": "Fix"
}
},
"transition": {
"id": "1"
}
}];
request({
url: url,
method: "POST",
json: true,
body: message,
}, function (error){});
Url(https://hibernate.atlassian.net/rest/api/2/issue/WEBSITE-1/transitions) gives me;
{"expand":"transitions","transitions":[]}
How can I resolve an issue in JIRA? Am I doing wrong?
You've got the right approach, but you need to authenticate your requests with a user that has permission to execute the transition.
Because you execute your requests anonymously, JIRA gives you a response that does not contain any transitions you can execute and will not allow you to perform a transition.
Take a look at the documentation for the request module or another example.
To get the full list of transitions, append the string ?expand=transitions.fields to your existing url. So in this case it would look like
var url = "https://hibernate.atlassian.net/rest/api/2/issue/WEBSITE-1/transitions?expand=transitions.fields";

foursquare venues/suggestcompletion doesn`t support math any part of word

I'm trying to send following request:
venues/suggestCompletion?ll=54.850945,83.100677&query=wear
Response:
id: "4e620509b993678bb634372c"
name: "Wearewowagency"
location: {
...
}
I'm trying to send following request:
venues/suggestCompletion?ll=54.850945,83.100677&query=wow
Response:
{
meta: {
code: 200
}
notifications: [
{
type: "notificationTray"
item: {
unreadCount: 0
}
}
]
response: {
minivenues: [ ]
}
}
Output:
LIKE str% doesn`t support LIKE %str%.
It's probably because there are not any interesting venues to return. If you are looking for venues that starts with "ins", then you get a response.
https://developer.foursquare.com/docs/explore#req=venues/suggestCompletion%3Fll%3D54.850945,83.100677%26query%3Dins
Remember that not all venues are returned from the venues/suggestCompletion endpoint.

Resources