NAME

AnyEvent::HTTP::Spark - Syncrnous/Asyncrnous HTTP Rest Client for Cisco Spark

SYNOPSIS

use AnyEvent::HTTP::Spark;
my $obj=new AnyEvent::HTTP::Spark(token=>$ENV{SPARK_TOKEN});

DESCRIPTION

Dual Nature Syncrnous/Asyncrnous AnyEvent friendly Spark v1 HTTP Client library.

Moo Roles Used

This class uses the following Moo Roles

HTTP::MultiGet::Role
Log::LogMethods
Data::Result::Moo
AnyEvent::SpakBot::SharedRole

OO Arguments and accessors

Required OO Arguments

token: required for spark authentication

Optional OO Arguments

logger: sets the logging object
agent: AnyEvent::HTTP::MultiGet object

api_url: https://webexapis.com/v1/
  # sets the web service the requests point to
retryCount: 1, how many retries to attempt when getting a 429 error

Options set at runtime

retries: anymous hash, used to trak AnyEvent->timer objects

OO Web Methods and special Handlers

Each web method has a blocking and a non blocking context.

Any Method with a prefix of que_ can be called in either a blocking or a non blocking context. Most people will use the blocking interface of the client.

Non Blocking context for use with AnyEvent Loops

my $cb=sub {
  my ($self,$id,$result,$request,$response)=@_;
  if($result) {
    print Dumper($result->get_data);
  } else {
    ...
  }
};
my $id=$self->que_listPeople($cb,$args);
$self->agent->run_next;

Blocking Context

my $result=$self->listPeople($args);
if($result) {
  print Dumper($result->get_data);
} else {
  die $result;
}

People

Get Me

  • Blocking my $result=$self->getMe()

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_getMe($cb)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

List People

  • Blocking my $result=$self->listPeople($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_listPeople($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Get Person

  • Blocking my $result=$self->getPerson($personId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_getPerson($cb,$personId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$personId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Create Person

  • Blocking my $result=$self->createPerson($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_createPerson($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Delete Person

  • Blocking my $result=$self->deletePerson($personId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_deletePerson($cb,$personId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$personId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Update Person

  • Blocking my $result=$self->updatePerson($personId,$hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_updatePerson($cb,$personId,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$personId,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Rooms

List Rooms

  • Blocking my $result=$self->listRooms($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_listRooms($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Get Room

  • Blocking my $result=$self->getRoom($roomId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_getRoom($cb,$roomId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$roomId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Create Room

  • Blocking my $result=$self->createRoom($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_createRoom($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Delete Room

  • Blocking my $result=$self->deleteRoom($roomId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_deleteRoom($cb,$roomId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$roomId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Update Room

  • Blocking my $result=$self->updateRoom($roomId,$hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_updateRoom($cb,$roomId,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$roomId,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Memberships

List Memberships

  • Blocking my $result=$self->listMemberships($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_listMemberships($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Get Membership

  • Blocking my $result=$self->getMembership($membershipId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_getMembership($cb,$membershipId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$membershipId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Create Membership

  • Blocking my $result=$self->createMembership($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_createMembership($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Delete Membership

  • Blocking my $result=$self->deleteMembership($membershipId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_deleteMembership($cb,$membershipId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$membershipId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Update Membership

  • Blocking my $result=$self->updateMembership($membershipId,$hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_updateMembership($cb,$membershipId,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$membershipId,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Messages

List Messages

Special Notes on bots for this method, bots can only list messages refering to the bot itself. This means there are 2 manditory arguments when using a bot. If mentionedPeople is not set to the litteral string 'me' a bot will encounter a 403 error.

$hashRef Required options

roomId: the id for the room
mentionedPeople: me
  • Blocking my $result=$self->listMessages($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_listMessages($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Get Message

  • Blocking my $result=$self->getMessage($messageId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_getMessage($cb,$messageId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$messageId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Create Message

  • Blocking my $result=$self->createMessage($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_createMessage($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Delete Message

  • Blocking my $result=$self->deleteMessage($messageId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_deleteMessage($cb,$messageId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$messageId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Teams

List Teams

  • Blocking my $result=$self->listTeams($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_listTeams($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Get Team

  • Blocking my $result=$self->getTeam($teamId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_getTeam($cb,$teamId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$teamId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Create Team

  • Blocking my $result=$self->createTeam($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_createTeam($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Delete Team

  • Blocking my $result=$self->deleteTeam($teamId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_deleteTeam($cb,$teamId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$teamId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Update Team

  • Blocking my $result=$self->updateTeam($teamId,$hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_updateTeam($cb,$teamId,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$teamId,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Team Memberships

List Team Memberships

  • Blocking my $result=$self->listTeamMemberships($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_listTeamMemberships($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Get Team Membership

  • Blocking my $result=$self->getTeamMembership($teamMembershipId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_getTeamMembership($cb,$teamMembershipId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$teamMembershipId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Create Team Membership

  • Blocking my $result=$self->createTeamMembership($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_createTeamMembership($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Delete Team Membership

  • Blocking my $result=$self->deleteTeamMembership($teamMembershipId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_deleteTeamMembership($cb,$teamMembershipId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$teamMembershipId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Update Team Membership

  • Blocking my $result=$self->updateTeamMembership($teamMembershipId,$hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_updateTeamMembership($cb,$teamMembershipId,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$teamMembershipId,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Webhooks

List Webhooks

  • Blocking my $result=$self->listWebhooks($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_listWebhooks($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Get Webhook

  • Blocking my $result=$self->getWebhook($webhookId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_getWebhook($cb,$webhookId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$webhookId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Create Webhook

  • Blocking my $result=$self->createWebhook($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_createWebhook($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Delete Webhook

  • Blocking my $result=$self->deleteWebhook($webhookId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_deleteWebhook($cb,$webhookId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$webhookId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Update Webhook

  • Blocking my $result=$self->updateWebhook($webhookId,$hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_updateWebhook($cb,$webhookId,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$webhookId,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Organizations

List Organizations

  • Blocking my $result=$self->listOrganizations($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_listOrganizations($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Get Organization

  • Blocking my $result=$self->getOrganization($organizationId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_getOrganization($cb,$organizationId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$organizationId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Licenses

List Licenses

  • Blocking my $result=$self->listLicenses($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_listLicenses($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Get License

  • Blocking my $result=$self->getLicense($licenseId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_getLicense($cb,$licenseId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$licenseId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Roles

List Roles

  • Blocking my $result=$self->listRoles($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_listRoles($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Get Role

  • Blocking my $result=$self->getRole($roleId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_getRole($cb,$roleId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$roleId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Events

List Events

  • Blocking my $result=$self->listEvents($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_listEvents($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Get Event

  • Blocking my $result=$self->getEvent($eventId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_getEvent($cb,$eventId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$eventId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Meetingss

List Meetingss

  • Blocking my $result=$self->listMeetingss($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_listMeetingss($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Get Meetings

  • Blocking my $result=$self->getMeetings($roomId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_getMeetings($cb,$roomId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$roomId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Create Meetings

  • Blocking my $result=$self->createMeetings($hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_createMeetings($cb,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Delete Meetings

  • Blocking my $result=$self->deleteMeetings($roomId)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_deleteMeetings($cb,$roomId)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$roomId)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Update Meetings

  • Blocking my $result=$self->updateMeetings($roomId,$hashRef)

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $id=$self->que_updateMeetings($cb,$roomId,$hashRef)

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$roomId,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Attaching files to messages

Posting files to channel steps outside of the traditional json data format.

  • Blocking my $result=$self->uploadFile('/path/to/file',%args);

    Returns a Data::Result Object, when true it contains the data, when false it contains why it failed.

  • Non-Blocking my $result=$self->que_uploadFile($cb,'/path/to/file',%args);

    Example Callback

    $cb=sub {
      my ($self,$id,$result,$request,$response,$roomId,$hashRef)=@_;
        # 0: $self The current AnyEvent::HTTP::Slack object
        # 1: $id the id of the http request
        # 2: Data::Result Object
        # 3: HTTP::Request Object
        # 4: HTTP::Result Object
      };

Low Level Request functions

This section documents low level request functions.

  • $self->handle_paginate($id,$result,$request,$response,$cb)

    Internal Method wrapper for parsing pagination headers.

    Example:

    my $code=sub {
      my ($self,$id,$result,$request,$response)=@_;
      $self->handle_paginate($id,$result,$request,$response,$cb);
    };
    return $self->que_get($code,$url,$args);

    Pagination information can be found in the following result fields.

    cursorPosition: last|next|prev|first
    pageLink: (undef when cursorPosition eq 'last') Url to the next page
  • my $result=$self->build_post_json($url,$data);

    Returns a Data::Result object; When true it contains an HTTP::Request Object For $url, the body will consist of $data converted to json. When false it contains why it failed.

  • my $id=$self->queue_builder($cb,$method,$url,$data);

    Returns the ID of the object in the request for $method.

  • my $id=$self->que_post_json($cb,$url,$data);

    Queue's a json post and returns the id

  • my $result=$self->build_put_json($url,$data);

    Returns a Data::Result object; When true it contains an HTTP::Request Object For $url, the body will consist of $data converted to json. When false it contains why it failed.

  • my $id=$self->que_put_json($cb,$url,$data);

    Queue's a json put and returns the id

  • my $result=$self->build_post_form($url,$data);

    Returns a Data::Result Object, when true it contains the correctly fromatted HTTP::Request Object, when false it contains why it failed.

  • my $id=$self->que_post_form($cb,$url,$data);

    Queue's a form post and returns the id

  • my $result=$self->build_get($url,$data);

    Returns a Data::Result Object, when true it contains the correctly fromatted HTTP::Request Object, when false it contains why it failed.

  • my $self->que_getRaw($cb,$raw_url)

    Que's a diy get request

  • my $id=$self->que_get($cb,$url,$data);

    Queue's a form post and returns the id

  • my $result=$self->build_head($url,$data);

    Returns a Data::Result Object, when true it contains the correctly fromatted HTTP::Request Object, when false it contains why it failed.

  • my $id=$self->que_head($cb,$url,$data);

    Queue's a form post and returns the id

  • my $result=$self->build_delete($url,$data);

    Returns a Data::Result Object, when true it contains the delete request, when false it contains why it failed.

  • my $id=$self->que_delete($cb,$url,$data);

    Ques a delete to run.

  • $self->handle_delete($cb,$id,$result,$result)

    Internal handler for delete results

AUTHOR

Michael Shipper <AKALINUX@CPAN.ORG>