Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Comments

Create an organization for documentation by being precise with headings and using the ToC macro to see it at the start of the page. I've added it below. Note that it's not very helpful because the structure of the page isn't very precise.

 

Channel Functions

FunctionUse
channelList a set of channels depending on what parameters are past.
channelAttributesLists a channels attributes
channelPolicyLists a channels policy
channelTypeLists a channels type

All channel functions return an object with a status and an return object. Documentation will referance the return object only.

Channel Actions

Event DomainEvent TypeActionsUse
wranglerchannel_creation_requested

createChannel

Creates a new channel
wranglerchannel_deletion_requesteddeleteChannelDeletes a channel
wranglerupdate_channel_attributes_requestedupdateAttributesUpdates a channel attributes
wranglerupdate_channel_policy_requestedupdatePolicyUpdates a channel policy
wranglerupdate_channel_type_requestedupdateTypeUpdates a channel type

channel

returns an array of channels keyed to channel. Each channel is owned by the pico which calls this function.

ParameterDatatypeRequired
<id><string>

 

<collection><string> 
<filtered><string> 
  • <id> = <channel_name> | <channel_eci>
  • <collection> = <type> | <name> | <cid>(will be eci soon)  |  <last_active> | <attributes>(may break)
  • <filtered> = <desired value of collection>

On success

keyvalue
channels

[{

"last_active":<number>,

"policy":<null>, //not implemented yet


"name":<string>,


"type":<string>,


"cid"(will be eci soon):<eci as string>,


"attributes":{


"channel_attributes":<string>

},

},..{}n]

 

uses example

response = v1_wrangler:channel(null,null,null){"channels"}; // all channels
response = v1_wrangler:channel("flipper",null,null){"channels"}; // single "flipper" channel
response = v1_wrangler:channel(null,"type",null){"channels"}; // collection of channels by type
response = v1_wrangler:channel(null,"type","OAUTH"){"channels"}; // collection of channels with "OAUTH" as type 

channelAttributes

returns an attributes object keyed to attributes. channel_attributes is the main channels attribute key.

must provide at least one of the parameters. 

ParameterDatatypeRequired
<eci><string>

 

<name><string>

 

  • <eci> =  <channel_eci>
  • <name> = <channel_name> 

On success

keyvalue
attributes
{
"channel_attributes":<string> // for example "Time_hopping"
}

 

uses example
response = v1_wrangler:channelAttributes("532569A0-43BB-11E6-AA23-29E4C71C24B1",null){"attributes"}; // attributes by eci
response = v1_wrangler:channelAttributes(null,"Dr.Who"){"attributes"}; // attributes by channel name
 

channelPolicy - not fully implemented 

returns an policy object keyed to policy. 

must provide at least one of the two parameters. 

ParameterDatatypeRequired
<eci><string>

 

<name><string>

 

  • <eci> =  <channel_eci>
  • <name> = <channel_name> 

On success

keyvalue
policy
{
"error":[""]
}

 

uses example
response = v1_wrangler:channelPolicy("532569A0-43BB-11E6-AA23-29E4C71C24B1",null){"policy"}; // policy by eci
response = v1_wrangler:channelPolicy(null,"Dr.Who"){"policy"}; // policy by channel name

 

channelType

returns a type as a string keyed to type.

must provide at least one of the two parameters. 

ParameterDatatypeRequired
<eci><string>

 

<name><string>

 

  • <eci> =  <channel_eci>
  • <name> = <channel_name> 

On success

keyvalue
type
<string> // for example "Time_wizard"

 

uses example
response = v1_wrangler:channelType("532569A0-43BB-11E6-AA23-29E4C71C24B1",null){"type"}; // type by eci
response = v1_wrangler:channelType(null,"Dr.Who"){"type"}; // type by channel name

createChannel

creates a new channel from an events provided attributes inside the desired Pico. fails on duplicate channel name provided. fails on empty name??

Event DomainEvent Type
wranglerchannel_creation_requested
AttributeDatatypeRequired
<eci><string>//defaults to eci used to raise event
<channel_name><string>

 

<channel_type><string>

 //defaults to Unkown

<attributess><string> 
<policy><string>//not fully implemented

Event raised on success

Event DomainEvent TypeAttributes
wranglerchannel_createdall attributes from original event

deleteChannel

removes a channel corresponding with the provided event attributes

Event DomainEvent Type
wranglerchannel_deletion_requested

must provide at least one of the two event attributes. 

AttributeDatatypeRequired
<eci><string> 
<channel_name><string>

 

Event raised on success // not being raised yet

Event DomainEvent TypeAttributes
wranglerchannel_deletedall attributes from original event

updateAttributes

updates attributes of a channel corresponding with the provided event attributes

Event DomainEvent Type
wranglerupdate_channel_attributes_requested

must provide at least one of the two, eci and channel_name event attributes. 

AttributeDatatypeRequired
<eci><string> 
<channel_name><string>

 

<attributess><string> 

Event raised on success // not being raised yet

Event DomainEvent TypeAttributes
wranglerchannel_attributes_updatedall attributes from original event


updateType

updates type of a channel corresponding with the provided event attributes

Event DomainEvent Type
wranglerupdate_channel_type_requested

must provide at least one of the two, eci and channel_name event attributes. 

AttributeDatatypeRequired
<eci><string> 
<channel_name><string>

 

<channel_type><string> 

Event raised on success // not being raised yet

Event DomainEvent TypeAttributes
wranglerchannel_type_updatedall attributes from original event

updatePolicy // not fully implamented 

updates policy of a channel corresponding with the provided event attributes

Event DomainEvent Type
wranglerupdate_channel_type_requested

must provide at least one of the two, eci and channel_name event attributes. 

AttributeDatatypeRequired
<eci><string> 
<channel_name><string>

 

<policy><string> 

Event raised on success // not being raised yet

Event DomainEvent TypeAttributes
wranglerchannel_policy_updatedall attributes from original event
  • No labels