Skip to content

EventSubmition & EventSubmitionRule domain struct #27

Closed
@elpiel

Description

@elpiel

https://github.com/AdExNetwork/adex-protocol/blob/master/campaignSpec.md#eventsubmission

EventSubmittion:
  • allow: array of EventSubmissionRule; for each POST to /channel/:id/events, the first rule that matches will apply
EventSubmissionRule:
  • uids: array of used IDs that this rule applies to; leave null for applying to everyone (note that subsequent rules in allow won't match); set to [null] to apply to requests without authentication
  • rateLimit: optional, object describing the rate limit to apply; for, this takes { type: "ip", timeframe }, where timeframe is a number; later, { type: "uid", timeframe } will be added

Examples

{ allow: [{ uids: null, rateLimit: { type: "ip", timeframe: 1000 } }] } - this will allow everyone to submit events, at a rate of 1 event per second per IP

{ allow: [{ uids: [channel.creator] }, { uids: null, rateLimit: { type: "ip", timeframe: 1000 } }] } - this will allow the creator to submit as many events as they like, but everyone else will be restricted to 1 event per second per IP

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions