:P Go through the docs more slowly: https://trello.com/docs/gettingstarted/index.html. This should be fun to mess around with if you have the right packages: strictures, URI::QueryParam, JSON, YAML (not necessary, comment out if you like), Path::Tiny. Set your developer key in your environment or add to the script.

#!/usr/bin/env perl use 5.010; use strictures; use URI; use URI::QueryParam; use LWP::UserAgent; use JSON; use YAML; # Just for fun/readability. use Path::Tiny; use open qw( :encoding(UTF-8) :std ); $ENV{TRELLO_KEY} ||= "YouForgotToSetThis"; my $version = 1; # My guess/interpretation of URL spec. my $service = URI->new("https://api.trello.com/"); $service->query_param( key => $ENV{TRELLO_KEY} ); my $uri = $service->clone; # URI from docs -> https://trello.com/docs/gettingstarted/index.html $uri->path("/$version/board/4d5ea62fd76aa1136000000c"); # Uncomment to get TONS of data -> $uri->query_param( cards => "open" +); $uri->query_param( list_fields => "name,desc" ); my $response = LWP::UserAgent ->new ->get( $uri ); die $response->as_string unless $response->is_success; my $data = decode_json( $response->decoded_content ); print YAML::Dump( $data ); # Just to see in human-readable tree. my $outfile = path("ohai.json"); # Save the JSON to a file. $outfile->spew_utf8( $response->decoded_content ); say "Check $outfile for the JSON."; exit 0;

In reply to Re: API Calls with RESTful & Trello by Your Mother
in thread API Calls with RESTful & Trello by humbleCoder

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.