Unable to get proper paginated data using API - pagination

Hello I have tried to extract paginated data using import.io. So far I have managed to retrieve JSON data by using Bulk Extract.
But I need it through the API, i.e. the export pane's API which is currently remaining unchanged even if I update the URLs via Bulk Extract.
Here is the url http://www.metalstorm.net/events/new_releases.php
I want to retrieve the new releases table with the album covers
Hoping to get a response soon

Related

Storing data from a form using nodejs and express

I need to get some data from a form as POST request and save that data so i can use it on another page.
I am successful at retrieving the data form the form as JSON, but since i am not using any database, i am not able to see the data that i retrieved from the form when i redirect for the next page..
I am new at using jade, nodejs and express. I'd like a opinion on how to retrieve the data that i've sent via post method.
If i use render, it loads the page with all the correct info, but if i reload or change to another page, the data will simple disappear.
You can use Redux Persist (state management tool) or local storage to save data. Both of these will save your data in a way that it can be retrieved when you navigate to the next page or even if you reload your page.

Algolia backend search or frontend search when an user ID is involved

I have my records stored in the Algolia index having a userID attribute associated with each. I want to perform a search such that the records visible to the user will be filtered such that the userIDs match. I can easily do this on the frontend using the instantsearch library and the userID stored in localStorage.
Problem with passing userID on the frontend
Anyone using the client can manipulate the Algolia request with different userIDs that will filter results relevant to those IDs. A security issue here. But as Algolia mentioned here frontend search can be upto 10x faster.
Solution using backend search
Can implement this such that a normal HTTP request is send to the backend with the relevant search parameters and filters and adding the userID in the backend. After that doing the search in the backend and sending the data back to the frontend using a HTTP response. Slower since it has go through multiple servers just to add the userID.
Question
I want to know if there is a still a workaround for this using frontend search and preserving security since speed is also important. I'm new to using Algolia and still not fully aware of what it is capable of.
Thanks.
There is a baked-in way to add user-based security for record access control.
You need to generate ephemeral API keys with filters hard coded. The end user cannot alter those filters to get around the security. When a user comes through your login flow, the backend generates this key with the appropriate filters (e.g. 'filters' => visible_by:group/'.$currentGroupId.' OR visible_by:group/Everybody' and passes it to the front end in places of the search-only API key.
Your records will need to include a matching attribute for the filter (visible_by in this case) with the appropriate values.
You can read more about it here:https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/#generating-a-secured-api-key

Creating a Dashboard with a Livestream option

As the title says I am trying to am creating a Dashboard.
The Dashboard should include an option to view Data inserted in a Database, live or at least "live" with minimal delay.
I was thinking about 2 approaches:
When the option is used the Back-End creates a Trigger in the Database(its only certain Data so i would have to change the Trigger according to the Data). Said trigger should then send the new Data via http to the Back-End.
What i see as a problem is that the delay of sending the Data and possible errors could block the whole database.
1.1. Same as 1. but the trigger puts the new Data in a seperate Table where i can then query and delete the Data.
Just query for the newest data every 1-5 sec. or so. This just seems extremly bad and avoidable.
Which of those is the best way to do this? Am i missing something? How is this usually done?
The Database is a pgsql Database,Back and Front-end are in NodeJs.

GET Index Schema from Azure Search

I'm currently working on a POC that uses Azure Search to make an Angular Front End.
I've searched everywhere and am looking for a way to query for the index schema.
What do I mean by this? On this page you can use a PUT to create an index using JSON.
Is there a way to get this JSON schema back using a GET or using the Azure Portal? I want to be able to populate a NavBar with the facetable fields without having to hard code them. Is this possible?
You can call Get Index REST API to get the schema of an Index.
Your request URL would be:
https://[service name].search.windows.net/indexes/[index name]?api-version=[api-version]
You would need Admin Key to authenticate the Get Index request.
You will need to parse fields element from the response body to get the list of all attributes of the index.

Sail.js - how to structure JSON based live data output with existing static data in the model

In my Angular app, I want to display a table which contains the following
a) URL
b) Social share counts divided by different social networks
Using Sails.js, I already have the api created for the URL when the results show up, I can display the URL now I'm confused how to get the appropriate social counts showing right besides
Here's the API I'm using: https://docs.sharedcount.com/
by itself, I can see the JSON it produces
But here are my questions:
Should I create a new api (model/controller) for social count data or include it in my model where I have the 'url' action defined?
If I create a new api or include the social_counts as an action in the current, what would my JSON query look like? to retrieve the URL's, I'm using default API blueprint that Sails provides, so:
http://www.example.com/url/find?where={"title":{"contains":"mark"}}
Struggling a bit in terms of the thought process, would be great to get input on this
It depends on your app. is your app will store that data or just consume it? If it need to store, of course you need the API. In purpose for modification or aggregating the data for example.
No, you can't do that. That shortcut method only works if you have the data in your database and let the Sails Waterline ORM and Blueprint API served it.
Perhaps, if you only need to consume the data from that Sharedcount API, you didn't need to use Sails as a backend, in this context. Just use Angular as a client of that API. Except if you need to modify the data first and store it in your own database, so Sails will helps with it's Waterline ORM and Blueprint API.

Resources