diff --git a/lib/pastebinner/api_client.rb b/lib/pastebinner/api_client.rb index 98ae8ca..48e8d07 100644 --- a/lib/pastebinner/api_client.rb +++ b/lib/pastebinner/api_client.rb @@ -4,6 +4,17 @@ module Pastebinner class ApiClient + # A hash of every endpoint that the Pastebinner::Api Client will use + ENDPOINTS = + { + login: '/api_login.php', + post: '/api_post.php', + raw: '/api_raw.php', + scraping: '/api_scraping.php', + scrape_item: '/api_scrape_item.php', + scrape_item_meta: '/api_scrape_item_meta.php' + }.freeze + # The pastebin pro api developer key # @return [String] '123456789' attr_accessor :api_dev_key @@ -29,17 +40,6 @@ module Pastebinner @base_api_url = 'https://pastebin.com/api' @scraping_api_url = 'https://scrape.pastebin.com' end - - # A hash of every endpoint that the Pastebinner::Api Client will use - ENDPOINTS = - { - login: '/api_login.php', - post: '/api_post.php', - raw: '/api_raw.php', - scraping: '/api_scraping.php', - scrape_item: '/api_scrape_item.php', - scrape_item_meta: '/api_scrape_item_meta.php' - }.freeze # @param api_dev_key [String] Required: Your unique developer api key # @param api_option [String] Required: Set as paste, this will indicate you want to create a new paste @@ -97,6 +97,9 @@ module Pastebinner execute_query(:api_post, params) end + + + # A hash of the api token def get_user_info params = { 'api_dev_key': api_dev_key } end