orbisweb3 / orbis-sdk Goto Github PK
View Code? Open in Web Editor NEWOfficial repository for the Orbis SDK.
Official repository for the Orbis SDK.
Currently the getPosts() function in the SDK has a hardcoded post limit at 50
.
It would be great if limit was a parameter so that developers could choose a different size limit:
async getPosts(options, page = 0, limit = 50) {
If that only requires changes in this function (and no backend changes), I can do that and push it as PR, to save you some time. Please let me know @baptistegreve ๐
error - ./node_modules/@ceramicnetwork/streamid/lib/commit-id.js:27:0
Module not found: Default condition should be last one
Import trace for requested module:
./node_modules/@ceramicnetwork/streamid/lib/index.js
./node_modules/@ceramicnetwork/http-client/lib/ceramic-http-client.js
./node_modules/@orbisclub/orbis-sdk/index.js
./src/components/layout/index.tsx
./src/pages/_app.tsx
https://nextjs.org/docs/messages/module-not-found
wait - compiling /_error (client and server)...
error - ./node_modules/@ceramicnetwork/streamid/lib/commit-id.js:27:0
Module not found: Default condition should be last one
Import trace for requested module:
./node_modules/@ceramicnetwork/streamid/lib/index.js
./node_modules/@ceramicnetwork/http-client/lib/ceramic-http-client.js
./node_modules/@orbisclub/orbis-sdk/index.js
./src/components/layout/index.tsx
./src/pages/_app.tsx
I tried to use ceramic's key-did-provider-ed25519
but seem to get this error:
provider.enable is not a function
code:
async connectOrbis(seed:string) {
const enc = new TextEncoder();
const authSecret = enc.encode(seed);
const provider = new Ed25519Provider(authSecret)
let res = await this.orbis.connect(provider);
console.log('orbit connect', res);
}
Thanks
Currently the Project object and the Context object have a one-to-many relationship. Project can have many contexts, while context only belongs to one project.
Context:
{
"name": "SGB Chat",
"project_id": "kjzl6cwe1jw145qvssudltw3f1qxhehs4yulyntvgzbs1jeco1yy3vv7kfm5uka",
"websiteUrl": "https://sgb.chat",
"accessRules": [],
"displayName": "SGB Chat",
"integrations": {
"discord": {
"channel_id": "1083760838004973678"
}
}
}
Project:
{
"name": "Sgb.chat",
"website": "sgb.chat"
}
I propose switching to the many-to-many relationship between the two. This would mean that a context can be used by many projects.
Let's say there's a community that has an Orbis chat frontend operated by person A. This person has very strict rules on which content to allow in the chat and regularly removes posts that do not fit these rules. Because part of the community does not agree with so strict censorship rules, a person B sets up an alternative frontend, but using the same context.
If we want person B to be able to run their own frontend with the same context, but having their own censorship rules, the many-to-many relationship between Project and Context is needed. Post removals need to occur on the Project level. Some posts can be removed in one project, but remain visible in another, even though both use the same Context.
@baptistegreve I would love to hear your opinion on this and what kind of changes would it require. Could it be developed in a backwards compatible way? Or having both systems running in parallel? Let me know your thoughts ๐
When trying to update a context access rules if you do not supply the name
field the update request will fail.
I wanted to post this "prophecy cat" gif link in one of my Orbis posts:
https://tenor.com/en-GB/view/dafuq-cat-flower-head-the-prophecy-is-true-gif-16939346
But the post just wouldn't go through. I was banging my head against a (virtual) wall for like 10 minutes until I realized that the post does not go through because there's a word "dafuq" in the GIF URL ๐
A profanity filter is an interesting topic to discuss. Here's a few questions:
getPosts()
options)Would love to hear your opinion on that @baptistegreve ๐
Please add RSS for your blog at https://useorbis.com/blog
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.