Closed
Description
https://github.com/AdExNetwork/adex-protocol/blob/master/campaignSpec.md#eventsubmission
EventSubmittion:
allow
: array ofEventSubmissionRule
; 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; leavenull
for applying to everyone (note that subsequent rules inallow
won't match); set to[null]
to apply to requests without authenticationrateLimit
: optional, object describing the rate limit to apply; for, this takes{ type: "ip", timeframe }
, wheretimeframe
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
- add all fields
- create fixtures
- use fixture for ChannelSpec ChannelSpec fields #24
Metadata
Metadata
Assignees
Labels
No labels