{"id":32212057,"url":"https://github.com/domm/api-medium","last_synced_at":"2025-10-22T06:57:48.090Z","repository":{"id":56839463,"uuid":"66643111","full_name":"domm/API-Medium","owner":"domm","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-30T12:31:26.000Z","size":10,"stargazers_count":0,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-22T06:57:37.583Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/domm.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-08-26T11:38:52.000Z","updated_at":"2021-01-10T21:24:51.000Z","dependencies_parsed_at":"2022-08-29T05:00:36.391Z","dependency_job_id":null,"html_url":"https://github.com/domm/API-Medium","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/domm/API-Medium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domm%2FAPI-Medium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domm%2FAPI-Medium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domm%2FAPI-Medium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domm%2FAPI-Medium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/domm","download_url":"https://codeload.github.com/domm/API-Medium/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domm%2FAPI-Medium/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280395523,"owners_count":26323517,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-22T06:57:36.442Z","updated_at":"2025-10-22T06:57:48.085Z","avatar_url":"https://github.com/domm.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nAPI::Medium - Talk with medium.com using their REST API\n\n# VERSION\n\nversion 0.902\n\n# SYNOPSIS\n\n    use API::Medium;\n    my $m = new({\n        access_token=\u003e'your_token',\n    });\n    my $hash = $m-\u003eget_current_user;\n    say $hash-\u003e{id};\n\n    my $url       = $m-\u003ecreate_post( $user_id, $post );\n\n    my $other_url = $m-\u003ecreate_publication_post( $publication_id, $post );\n\n# DESCRIPTION\n\nIt's probably a good idea to read [the Medium API\ndocs](https://github.com/Medium/medium-api-docs) first, especially as\nthe various data structures you have to send (or might get back) are\n**not** documented here.\n\nSee `example/hello_medium.pl` for a complete script.\n\n## Authentication\n\n### OAuth2 Login\n\nNot implemented yet, mostly because medium only support the \"web\nserver\" flow and I'm using `API::Medium` for an installed\napplication.\n\n### Self-issued access token / Integration token\n\nGo to your [settings](https://medium.com/me/settings), scroll down to\n\"Integration tokens\", and either create a new one, or pick the one you\nwant to use.\n\n# Methods\n\n## new\n\n    my $m = API::Medium-\u003enew({\n         access_token =\u003e $token,\n    });\n\nCreate a new API client. You will need to pass in your `$token`, see\nabove on how to get it. Please make sure no not leak your Integration\nToken. If you do, anybody who has it can take over your Medium page!\n\n## get\\_current\\_user\n\n    my $data = $m-\u003eget_current_user;\n\nFetch the User \"object\".\n\nYou will need this to get the user `id` for posting. Depending on\nyour app you might want to store your `id` in some config file to\nsave one API call.\n\n## publications\n\nNot implemented yet. Listing the user's publications\n\n    /users/{{userId}}/publications\n\n## contributors\n\nNot implemented yet. Fetching contributors for a publication.\n\n    /publications/{{publicationId}}/contributors\n\n## create\\_post\n\n    my $url = $m-\u003ecreate_post( $user_id, $post_data );\n\nCreate a new post. If you pass in bad data, Medium will probably\nreport an error.\n\n`publishStatus` is set to 'draft' unless you pass in another value.\n\n## create\\_publication\\_post\n\n    my $url = $m-\u003ecreate_publication_post( $publication_id, $post_data );\n\nCreate a new post under a publication. You will need to figure out the\npublication\\_id by calling the API from the commandline (until\n`publications` is implemented.)\n\nIf you pass in bad data, Medium will probably report an error.\n\n`publishStatus` is set to 'draft' unless you pass in another value.\n\n## TODO\n\n- OAuth2 Login\n- Get a new access\\_token from refresh\\_token\n- `publications`\n- `contributors`\n\n## Thanks\n\nThanks to Dave Cross for starting [Cultured\nPerl](https://medium.com/cultured-perl), which prompted me to write\nthis module so I can auto-post blogposts from [my private\nblog](http://domm.plix.at) to medium.\n\n# AUTHOR\n\nThomas Klausner \u003cdomm@plix.at\u003e\n\n# COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2016 - 2021 by Thomas Klausner.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdomm%2Fapi-medium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdomm%2Fapi-medium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdomm%2Fapi-medium/lists"}