Is there a way to specific refer to only one id from this rest api using jsonpath? - home-automation

I'd like to just get data from UK.GOV when I send a GET request to this API.
https://api.covid19uk.live/
Can this be done using JSONpath? And how would this be done?
This is a bit of a prerequisite for my project because I am trying to make a sensor in Home Assistant that I can use to grab confirmed cases and deaths from Covid19 in the UK.
Home assistant has a built in REST platform structure:
https://www.home-assistant.io/integrations/rest/
Which uses json_attributes and json_attributes_path. Therefore I must be able to do it this way in order for it to work in the desired way.

Related

Google ads api list all accounts and their campaigns

I am totally new to google ads, I have a google ads account setup. I have a customer id (which I believe is the parent account id), under this I have a lot of 'Accounts' (url: ads.google.com/aw/accounts) setup. Every account have a list of campaigns. I want to prepare a report to fetch all campaigns and there settings. I am using postman to hit google apis (googleads.googleapis.com/v8).
I want to know what apis I can use to list all customer accounts and their campaigns?
Using the rest API for this sort of operation is not advised. It's expensive and there's an extremely tight limit.
It's advised to use the gRPC client libraries as they use search operations. You can learn more here: https://developers.google.com/google-ads/api/docs/start
Each of the client libraries has a robust set of examples and sample code that demonstrates exactly what you're trying to achieve (called list_accessible_accounts or similar). If you let me know what language you're using I can point you to the correct one.

How to Embed a PowerBI Tile in a Rails app? (and apply filter to it)

I'm struggling with this since a week... I have tried so many things, read so many documentations (walkthrougsh), I can't find any solutions and I have lost the clarity. I really need your help.
I have created a simple Rails app.
I have a Power BI account and a Azure account.
I'm using an example set of data on PowerBI (Retail Analysis Sample).
I want my users to signin on my app (through devise), then access to some pages and see embedded PowerBI Tiles (or report, or dashboard maybe). Then I want them to be able to filter the results. A client-side example is https://microsoft.github.io/PowerBI-JavaScript/demo/filters.html.
I want to be able to do the same.
I'm lost with all the client id, secret, ressource uri, ressource url, ...
What solution/walkthrough must I use?
Thank you so much for your time
Fro
New tile API allows to integrate content from a user’s Power BI
account into application UI for tiles that are on a user’s
dashboards. You can leverage this to add personalized BI content from
your user’s Power BI account into your application.
See documentation
A Sample application
You may want to look into Power Bi Embedded here. This will allow you to control who can see what content from within your application without having to authenticate with the Power Bi service. Power Bi Embedded is an azure service that allows you to upload pbix files which are then subsequently available for view by using an "Access key" to get a token to view the report. I know it works well for displaying "Reports," I am not sure about just showing "Tiles." They recently released RLS and some new Javascript SDK for more advanced features like filtering, check that here.
Hope this helps.

Using the ProfileAdminService to Follow a user

I'm trying to figure out if there's a way to use the ProfileAdminService (com.ibm.sbt.services.client.connections.profiles.ProfileAdminService) to get one user to follow another user.
I can see that you can do it via a put to /profiles/admin/atom/following.do but I was hoping to just use service.
I've investigated the FollowService but this only (at least that i can see) allows the current authenticated user to follow someone, but I want to be able to get any user to follow someone.
Thanks
The feature was not implemented in the IBM Social Business Toolkit SDK
you can look at the Code for ProfileAdminService and you'll see the methods do not include establishing a following relationship.
You need to use the REST API - http://www-10.lotus.com/ldd/lcwiki.nsf/xpAPIViewer.xsp?lookupName=IBM+Connections+5.0+API+Documentation#action=openDocument&res_title=Following_a_person_using_the_Administration_API_ic50&content=apicontent
with the specified body. You need to craft the URL properly in order to get the feature to work via the REST API

Using Google Maps to store custom set of locations (iOS Google Maps SDK)

Create mobile application, which gives the user ability to look for certain places (payment terminals) nearby and to add new ones. Of course user will have ability to edit places, change some of their meta-info fields, add photos, etc.
I can understand, how to implement such things at the mobile device side(i mean interface and model), but can't imagine, what i have to do at the "google-side" to store locations and get them to device.
I'm looking through developers.google.com for appropriate service, but google have so much different "Maps" services and their variety makes me disappointed, which one can give me necessary instruments.
I'm sorry, if my question is too stupid but i can't realize how to implement such functionality.
If anybody ever made such applications, please help me to find, at least, the service, which can help me to implement such functionality. Sample code at github will be the great!
You're looking to build a "back-end" or a database to store the locations that you are interested in. This means that you will save them on a server, that you will access through requests over the internet from your iPhone.
For a really simple back-end to set up, check out Parse that is very simple to implement.

Using OAuth to retrieve "consumer" email from a linked Google Apps Script within a Google Apps Site

While https://developers.google.com/accounts/docs/OAuth2Login is very descriptive, I cannot seem to wrap my head around how to translate into a Google Apps Script.
The ultimate goal is to have the user click a link, authorize access to their userinfo. I will then use their email address or userId to assign the appropriate spreadsheet to other Google Apps Scripts UIs.
I am certain that some sample code would get me on my way.
Is it even possible?
Can a linked be utilized to make this happen? http://support.google.com/sites/bin/answer.py?hl=en&answer=1224166&topic=1224152&ctx=topic
The trouble is that when you publish your script as a service, it executes under your ID. All the authorization has to be done in the script editor. So, when a third person clicks a button or link or whatever, the script runs under your user ID and all you get back is your own user id.
In short, the answer is no. Sad, but true :(
Check out the OAuth code on the Google Code site. There are some great examples along with the client (and server) code in several different programming languages. Follow along with the samples on how to get the tokens needed.

Resources