Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Clarification Needed] Post Expression #7

Open
Nash0x7E2 opened this issue Sep 4, 2019 · 1 comment
Open

[Clarification Needed] Post Expression #7

Nash0x7E2 opened this issue Sep 4, 2019 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed

Comments

@Nash0x7E2
Copy link
Contributor

What is the expected data type for attributes and context in /post_expression?

{ expression: {expression object data}, attributes: [array of attributes (channels)], context: [array of context(s) addresses] }

@Nash0x7E2 Nash0x7E2 added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Sep 4, 2019
@jdeepee
Copy link
Member

jdeepee commented Sep 6, 2019

Hey sorry I should have included some more info in the documentation outlining the various data types. expression follows this data structure:

{ 
    expression_type: "LongForm"/"ShortForm"/"PhotoForm"/"EventForm"/"BulletForm",
    expression: {
        LongForm{
            title: String,
            body: String
        },
        ShortForm{
            background: String,
            body: String
        },
        PhotoForm{
            image: String,
            caption: String
        },
        EventForm{
            title: String,
            date: String,
            location: String,
            details: String
        },
        BulletForm{
            title: String,
            bullets: [String]
        }
    }
}

Only one expression type should be used per request so type longform should have the LongForm object sent also.

attributes: these are channels (topics) as defined by the user. Just an array of strings here. Eric can fill you in more if you are unsure how channels work in the context of the application.

context: these are addresses for given "locations" where a post can be sent. It will usually be one of the following: a group, a den or the collective (public) space. Again just an array of strings containing the addresses is what is needed here. In order to make a collective post you will pass the dna address of the holochain application. This address can be retrieved at get_env.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants