Net::Flowdock - Flowdock API
version 0.03
use Net::Flowdock; my $client = Net::Flowdock->new(key => 'find-your-own'); # Or, if you need to use authenticated methods my $client = Net::Flowdock->new(key => 'find-your-own', username => 'foo', password => 'bar'); $client->push_team_inbox({ source => 'CPAN', from_address => 'gphat@cpan.org', from_name => 'Cory Watson', subject => 'Uploaded Net::Flowdock', content => "Sho' nuff", project => 'Open Source', tags => 'wow,yeah,poop', link => 'http://search.cpan.org' });
Net::Flowdock is a simple client for using the Flowdock API. It specifically speaks to the REST and Push APIs.
Set/Get the debug flag.
Set/Get the key to use when connecting to Flowdock.
To obtain the API Token go to Settings -> Team Inbox inside a flow.
Set/Get the password for authenticated request.
Set/Get the URL for Flowdock. Defaults to https://api.flowdock.com.
Set/Get the username for authenticated request.
Get a single flow. Single flow information always includes user list of flow. Otherwise the data format is identical to the list.
Lists the flows that the authenticated user has access to.
Send a messge to a flow.
One of the valid Flowdock message events. Determines the type of message being sent to Flowdock. See Message Types section below. Required.
The actual message. The format of content depends on the event. Required. Types are message (normal chat), status, (status update), mail (team inbox).
item tags
List of tags to be added to the message. Can be either an array (JSON only) or a string with tags delimited with commas. User tags should start with '@'. Hashtags can optionally be prefixed with "#". Tags are case insensitive.
Some examples:
A status update:
$client->send_message({ organization => 'iinteractive', flow => 'testing', event => 'status', content => 'Away for a bit', });
A message in chat:
$client->send_message({ organization => 'iinteractive', flow => 'testing', event => 'message', content => 'I am a robot', tags => 'foo, bar' });
XXX Todo: mail
Required fields:
Human readable identifier of the application that uses the Flowdock API. Only alphanumeric characters, underscores and whitespace can be used. This identifier will be used as the primary method of categorization for the messages.
Example value: Awesome Issue Management App
Email address of the message sender. The email address is used to show a avatar of the sender. You can customize the avatar by registering the address in
Example value: john.doe@yourdomain.com
Subject line of the message, will be displayed as the title of Team Inbox message.
Content of the message, will be displayed as the body of Team Inbox message.
Following HTML tags can be used: a abbr acronym address article aside b big blockquote br caption cite code dd del details dfn div dl dt em figcaption figure footer h1 h2 h3 h4 h5 h6 header hgroup hr i img ins kbd li nav ol p pre samp section small span strong sub summary sup table tbody td tfoot th thead tr tt ul var wb
Optional fields:
Name of the message sender.
Example value: John Doe
Human readable identifier for more detailed message categorization. Only alphanumeric characters, underscores and whitespace can be used. This identifier will be used as the secondary method of categorization for the messages.
Example value: My Project
Format of the message content, default value is "html". Only HTML is currently supported.
Example value: html
Tags of the message, separated by commas.
Example value: cool,stuff
Link associated with the message. This will be used to link the message subject in Team Inbox.
Example value: http://www.flowdock.com/
Content of the message. Tags will be automatically parsed from the message content. Required.
Name of the "user" sending the message. Required.
Tags of the message, separated by commas. Optional.
Cory G Watson <gphat@cpan.org>
This software is copyright (c) 2012 by Infinity Interactive, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Net::Flowdock, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Flowdock
CPAN shell
perl -MCPAN -e shell install Net::Flowdock
For more information on module installation, please visit the detailed CPAN module installation guide.