class Devto::Client

Included Modules

Defined in:

devto/client.cr

Constructors

Instance Method Summary

Instance methods inherited from module Devto::Connection

download(endpoint : String) download, get(endpoint, params : Hash(String, String) | Nil = nil, headers : HTTP::Headers | Nil = nil, body : String | Nil = nil) get, get_pagination(endpoint, params : Hash(String, String) | Nil = nil, headers : HTTP::Headers | Nil = nil, body : String | Nil = nil, &) get_pagination, http(host : String | Nil = HOST) : HTTP::Client http, request(method, endpoint, params : Hash(String, String) | Nil = nil, headers : HTTP::Headers | Nil = nil, body : String | Nil = nil) request

Constructor Detail

def self.new(ctx : Medup::Context) #

[View source]

Instance Method Detail

def close #

[View source]
def convert_to_api_url(url : String) : String #

Converts public article url to api format url. in: https://dev.to/jetthoughts/how-to-use-linear-gradient-in-css-bi1 out: https://dev.to/api/articles/jetthoughts/how-to-use-linear-gradient-in-css-bi1


[View source]
def post_by_url(url : String) : Devto::Post #

Retrive article from provider and convert build Post object.


[View source]
def post_urls_by_author(author : String) #

[View source]