I don't understand the app concept in weavy.
I am not very clear about the concept of apps in Weavy. In my web app, I intend to have at least two chat rooms, are each room apps? Or is my web app an 'app'? I would be grateful for any help.
I don't understand the app concept in weavy.
I am not very clear about the concept of apps in Weavy. In my web app, I intend to have at least two chat rooms, are each room apps? Or is my web app an 'app'? I would be grateful for any help.
Short answer, Yes.
Every Chat, Feeds or Files "component" you add is considered an inidividual app in Weavy. Every app has one or more members (users) that are allowed to view and interact. It's up to you, the developer, to create and add members to a Weavy app.
App initialization can be done before hand if you know what you need to create. Or on the fly in your own web application when a user clicks on a specific page or other context where you want to display a Weavy app. The context is often used as the unique id for the Weavy app. For example, if you have a product page "Product A" in your web application, you probably want to initialize the Weavy app using something related to that. The product name or the product id and so on.
You can initialize an app using the Weavy api.
$ curl -H 'Authorization: Bearer {WEAVY_APIKEY}' https://{WEAVY_SERVER}/api/apps/init -d '{app: {"uid": "my-chat", "name": "My Chat", "type": "chat"}, user: {"uid": "user-1"}}'
https://www.weavy.com/docs/reference/api-reference/apps#initialize-app
The above request creates a new chat app with the unique id my-chat. The user with the unique id user-1 is added as a member.
So, if you want to create another Chat, make the request again with another uid.
You can add additional members to an app using the following api request:
$ curl -X PUT {WEAVY_SERVER}/api/apps/{app_id}/members/{user_id}
-H "Authorization: Bearer {WEAVY_APIKEY}"
https://www.weavy.com/docs/reference/api-reference/apps#add-member-to-app
To summarize, an app in Weavy is a unique app/component that you, the developer, create wherever you need it. You can create as many Weavy apps (Chat, Feeds, Files) that you need. A Weavy app is most often related to some sort of context in your own web application, a product page, a support article, or anything.