Shoutem Schema Design - shoutem

I have a question related to the data schema setup. For example, I want to create a list of objects, and in each object have another list object. So how should the schema look? And how should I set up the adminPages property in the extentions.js?
In addition, I want to access the user data login that created by Shoutem Cloud Server to add, edit, or remove the user.
Thank you all so much.

I answered on the Facebook community group, but I figured I'd answer here as well.
Regarding the schema, keep in mind it's just a Shoutem flavored JSON schema. We do have a reference for it. Look into "Custom referenced schema - array" and "Custom referenced schema - Single object".
Regarding user management, currently we don't have an exposed API that developers could utilize to manage users in the way you described.

Related

Is it possible to add pre-defined collections cannot be deleted / edited to Directus

I wonder if I could Directus as a CMS back-end for my huge project.
This requires me to add pre-defined collections that cannot be deleted or edited. Also, I need to prevent users add new collections.
I couldn't find anything in the docs for now; since Directus is not invented the way I want; It is expected to be extendable as much as possible. So I think I need to edit -almost- the whole system.
I hope I can find someone to lead me. Thanks.
The Directus is having a roles & permissions module where you can define who can create/edit/update/read the collections as well as items inside it.
There are 2 default roles:
Admin
Public
Only admins can create & maintain collections. You can add additional roles and define permissions for it. More on roles: https://docs.directus.io/guides/roles.html
You can also ask Directus to skip specific database tables and don't manage those. If you need to read data from skipped tables, you can write custom endpoints.
You can check the Directus setup live at: https://www.directus.app
P.S. I've worked on Directus interfaces and my team is working on API. Let me know if you need more help.

Confusion about Foursquare's Attribution & Linking policy: what other ways can I attribute them besides creating a link?

I see either link them directly or visual attribute them. Example: say my website provides a recommendation directly to a user based on their submitted interest, do I just make sure "powered by Foursquare" shows underneath?
Any help would be appreciated! I'm new to tech development
These policies are generally more vague on purpose. Rule of thumb: If you're showing any data to users that isn't your own, it should be clear to them where it's coming from. This is done so the data provider gets proper attribution but also can protect yourself against content being displayed on in your app/site.
For Foursquare specifically, it seems like you would need to include a "Powered by Foursquare" icon and optionally provide a link to the venue if the user may need more information about the place.

Permissions/Roles in GraphQL

Is it possible to show that some collections can be accessed only by user which has same permissions/roles?
For example how it is in https://api.slack.com/methods/channels.create
Expected scopes:
channels:write read
The concept of access permissions exists at the layer of business
logic and is not intrinsic to GraphQL itself. I think your best bet
here may be documenting any constraints that in description fields in
the schema, where they will then be shown in the GraphiQL
documentation explorer.
https://github.com/graphql/graphiql/issues/564

How can I obtain an API-key for my Fusion Tables

Yep, newbie question here, but it's bothering me for some days now, trying to read all the docs on google developer site, but I'm spinning in circles.
I've created a Fusion Table and set the access to 'public' and got an ID.
According to Goolge I should have an API key to access the data from a REST-call. Google suggests:
Go to the Google Developers Console.
Select a project, or create a new one.
In the sidebar on the left, expand APIs & auth. Next, click APIs. In the list of APIs, make sure the status is ON for the Fusion Tables API.
In the sidebar on the left, select Credentials.
I can do that all I've got an API-key, but how does this relates to the Fusion Table I've created? Can I use that API key for
this is really simple API key give the ability to do the most of mysql request type SELECT,INSERT,UPDATE,DELETE using GET and POST also PUT request , for GET you can use the navigator for that but the most effective way for your case is the use of curl librairie for php or jaira for java ... so you can send post or put request with a simple script.
So, what you can do with fusion table is automating the process of manipulating data and the option to share those data with someone else.
Edit: procedures changed since this post. Your mileage may vary
Head to the Google Developers Console
Create a project
Under Explore other services click "Enable APIs and get credentials like keys"
Search for Fusion Tables
Enable Fusion Tables API as a service under APIs & Auth --> APIs
You probably want the browser key. Grab the API key.
Happy Mapping...
API-keys are not related to specific Fusion Tables, they are related to projects.
You may use the key to request data from any public and downloadable FusionTable(not only your own Tables ), the key basically is used to identify your project(google-account) .
So when you have problems with requesting data from a public table, check if the table is downloadable too(click on the table-name on top-left->reuse access->allow downloads ).

What is a writable API?

I recently heard term 'Writable API' which is totally new for me. Can anyone explain what does it mean?
A publicly writable API is an API that allows anyone to attach meta-data to objects in the owner's database without changing the original content.
For example, take this object: http://twitter.com/#!/MarsPhoenix/status/1917793215. It is a tweet from the Pheonix Mars Lander.
The tweet is owned by Twitter. But what if I want to tag it and share those tags with the world?
If Twitter opened a writeble API, I could add my own data to this tweet. Say I add the tags "mars" and "nasa" to this object, they would be stored as devon/tag:mars and devon/tag:nasa in their database. If user Bob added a tag of "phoenix", it would be stored as bob/tag:phoenix in Twitter's database.
Now we can both share our tags with the world without overwriting any of Twitter's or each other's data.
Here is a good blog post explaining the concept:
http://blogs.fluidinfo.com/fluidinfo/2011/02/14/what-is-a-writable-api/
I wrote the article #Devon linked to, so agree with him :-) Though I'd change his "without changing the original content" to also say that the addition to the data also doesn't require the permission of the original app either (APIs are in a way largely about permission - they're designed to let you do things, but also sharply limit what you can do).
As a concrete illustration of #Devon's example of putting metadata onto tweets, here's how you can do it with Fluidinfo: http://blogs.fluidinfo.com/fluidinfo/2009/12/01/putting-metadata-onto-tweets-with-fluiddb/
We've also posted some writable API examples, for Boing Boing and Union Square Ventures. See http://blogs.fluidinfo.com/fluidinfo/2011/01/27/how-we-made-an-api-for-boingboing-in-an-evening/ and http://blogs.fluidinfo.com/fluidinfo/2011/02/15/how-i-made-a-writable-api-for-union-square-ventures-in-an-hour/
We have a couple more nice examples coming out this week at the LAUNCH conference in SF.
Hope that helps!
Terry Jones
A Writable API would be an API that allows you to write data to the target system/platform rather than a Read-Only API.
For example, StackOverflow/StackExchange provides a Read-Only API whereas the Twitter API is Writable.