Is it possible to run chat bot written in apps-script as "me" - hangouts-chat

It is possible to deploy the app scripts projects as web apps and execute them as script owner ("Execute the app as me").
I don't see something like this for chat bots.
I looked here https://developers.google.com/hangouts/chat/how-tos/bots-apps-script#authorization
It would be nice to have something like in appscript.json
{
"timeZone": "Europe/Paris",
"dependencies": {
},
"exceptionLogging": "STACKDRIVER",
"chat": {
"executeAs": "USER_DEPLOYING"
}
}
Is it possible?
Update: created a feature request https://issuetracker.google.com/issues/74233022

As of now Hangouts Chat currently does not have this feature. The best way to have this pushed to Hangouts Chat is probably by filing feedback via https://issuetracker.google.com/issues/new?component=350158&template=1047215 and hope that it gets enough upvotes.

Related

Unknown (undocumented) SONOS display type used in Spotify music-service on mobile devices

Even though there are already 2 other questions on the subject (this and this), no documentation have yet been provided by somebody from Sonos developer team.
The problem still remains: how one can attain a similar customised Spotify-like display type on Sonos mobile controller app. I'm talking about the root container of the Spotify music-service. It looks like this.
whereas the documentation clearly only talks about the grid, list, hero and editorial display types, none of which being the one used in Spotify music-service integration. Take a look:
grid
list
hero
editorial
The above 2 other questions I mentioned indicate that, as of April '18, Sonos developer team was working on enabling this experience, but, after almost 2 years, there is nothing AFAIK.
Thanks for help!
Sonos seem to have given up on developer support here. Spotify uses non-public features of SMAPI to customize its home screen, based on json instead of SOAP.
It seems like Spotify uses a different capability flag for this. In the music services discovery you can fetch from the player. You see they provide a json manifest.
As explained here, I suspect the capabilities field is a bitmask, where you can store one or more booleans in a single integer. You just have to figure out which one says, extended metadata (and send a PR on the documentation).
{
"Name": "Spotify",
"Version": "1.1",
"Uri": "https://spotify-v5.ws.sonos.com/smapi",
"SecureUri": "https://spotify-v5.ws.sonos.com/smapi",
"ContainerType": "MService",
"Capabilities": "5310995",
"Manifest": {
"Version": "12",
"Uri": "https://mnfts.ws.sonos.com/p/spotify-manifest.5.json"
},
"Id": 9,
"Policy": {
"Auth": "AppLink",
"PollInterval": 300
}
},
Other services should be able to provide a similar experience.
I’m not connected to Sonos, I just written a extensive documentation page about local control off Sonos speakers.

Alternative to giftedchat react native

In all the react-native tutorials I have seen so far, on building a chat app, I see them using gifted chat.
After installing the library, it is really buggy and slow. Below are some things I experience when using it.
When I have messages over 100, it takes time to load my chats.
When I press the send button, It takes time as well before updating the chat list(about a second).
Are there any other alternatives to gifted chat?
Slowness or fastness would depend on the "backend" (database and/or server) you are integrating your chat app (or component) with. Firebase (from Google) FireStore or Firebase Realtime DB would be one of the best options to choose from. This might help you in integrating Firebase DB with gifted-chat.
react-native-gifted-chat seem not to be actively maintained.
I found react-chat-elements I did not try it yet.
If you found something else please leave a comment.
good look with your search.

Does the Shopify API have a way to get a list of all installed apps?

Does the Shopify API have a way to get a list of all installed apps?
I want to keep a history of all apps installed on my stores. The only relevant thing I can find in the API docs is about a Webhook to get notified of an 'app/uninstalled' event.
EDIT
An 'app/installed' event would be ideal, if it existed. It would enhance the security of my stores if I could fetch the list of apps that are installed, or be notified when an app is installed or uninstalled.
To address security concerns, I believe that access to this data should be restricted in the same ways that other API endpoints and webhooks are restricted. The store owner would grant permission to an app to allow it access. This would make it as secure as, for example, customer names.
I'm looking for something roughly equivalent to WordPress's get_plugins function, but for Shopify.
Hey you can use this endpoint to fetch all the installed apps https://shopify.dev/api/admin-graphql/2022-01/objects/queryroot#connections
##example request##
appInstallations (first: 5) {
edges {
node {
id,
launchUrl,
app{
title
},
}
}
}
No. You cannot use the API to query a shop about what Apps it has installed. Imagine that. You get to know all those little shop details and do what with them? Would be like giving you permission to uninstall Apps too. You see why that is a problem? Bad enough Apps can perform cross-talk with metafields... Apps would be another level of wrong.

Facebook in a Mac App

how would I integrate Facebook into my Mac Application. I could give Objective-C a bit of a go, but it's going to be in an AppleScript-Objective-C project.
I could.. update the user's status a bit better instead of just opening their web browser and pointing them to "Facebook.com" , I could make my own interface that interacts with Facebook.
Any ideas?
You can interact with the Facebook API in many different ways, including submitting status updates as a POST request to the graph api. Their examples aren't at all language-specific. They demonstrate how to interact with it using curl on the command line, for instance.
Docs are here: http://developers.facebook.com/docs/
EDIT: Laziness IS one of the Three Virtues of the Programmer, but dude.... Clicking a link is too hard? Well, okay:
Here's how you authenticate your applications and get added as an application for a user:
http://developers.facebook.com/docs/authentication/desktop
Then here's how to work the Graph api. The section you want is "Publishing" most of the way down the page:
http://developers.facebook.com/docs/api/

twitter bot with api

im writing a bot that replies to a user message instantly. from what i've read their api only allows checking updates every minute or so.
it's there a push feature or a 3rd party service that pushes the new message to my server right away?
i've seen bots that can do this.
Twitter allows white listing of apps. Then you are only limited to something like 20 or 200 thousand requests an hour. You might want to contact them.
You can look at tweebot python micro framework.
A Python library to build twitter bots over tweepy library. It's a very simple
and flexible way to create your own bot.
First apply for Developper Twitter Account.
And setup your app using the official list of librairies. (python, js and many others available)
If you are using JS, you might not want to use Twit because it is only working with v1.1. You might prefer Twitter-api-v2 but be careful as for now, media upload is not available on v2.
I advise you request an Elevated access from your Developer personal space, which is immediate, and will allow you to use v1 functionalities.
Here is a sample for tweeting an image using twitter-api-v2 (using Elevated account with v1)
import { TwitterApi } from 'twitter-api-v2';
import { twitterconf } from './conf.js';
const client = new TwitterApi({
appKey: twitterconf.CONSUMER_KEY,
appSecret: twitterconf.CONSUMER_SECRET,
accessToken: twitterconf.ACCESS_TOKEN_KEY,
accessSecret: twitterconf.ACCESS_TOKEN_SECRET
});
const image = await client.v1.uploadMedia('/path/to/image.png');
const newTweet = await twitterClient.v1.tweet('Hello World!',
{ media_ids: image });