API-Medium
view release on metacpan or search on metacpan
lib/API/Medium.pm view on Meta::CPAN
=head2 get_current_user
my $data = $m->get_current_user;
Fetch the User "object".
You will need this to get the user C<id> for posting. Depending on
your app you might want to store your C<id> in some config file to
save one API call.
=head2 publications
Not implemented yet. Listing the user's publications
/users/{{userId}}/publications
=head2 contributors
Not implemented yet. Fetching contributors for a publication.
/publications/{{publicationId}}/contributors
=head2 create_post
my $url = $m->create_post( $user_id, $post_data );
Create a new post. If you pass in bad data, Medium will probably
report an error.
C<publishStatus> is set to 'draft' unless you pass in another value.
=head2 create_publication_post
my $url = $m->create_publication_post( $publication_id, $post_data );
Create a new post under a publication. You will need to figure out the
publication_id by calling the API from the commandline (until
C<publications> is implemented.)
If you pass in bad data, Medium will probably report an error.
C<publishStatus> is set to 'draft' unless you pass in another value.
=head2 TODO
=over
=item * OAuth2 Login
=item * Get a new access_token from refresh_token
=item * C<publications>
=item * C<contributors>
=back
=head2 Thanks
Thanks to Dave Cross for starting L<Cultured
Perl|https://medium.com/cultured-perl>, which prompted me to write
this module so I can auto-post blogposts from L<my private
blog|http://domm.plix.at> to medium.
=head1 AUTHOR
Thomas Klausner <domm@plix.at>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2016 - 2021 by Thomas Klausner.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
( run in 0.691 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )