Add Axios documentation (0.27.2)
Unified · Split
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | [ |
| 2 | 2 | [ |
| 3 | 3 | "2022-08-27", |
| 4 | − "New documentations: <a href=\"/sanctuary/\">Sanctuary</a>, <a href=\"/requests/\">Requests</a>" | |
| 4 | + "New documentations: <a href=\"/sanctuary/\">Sanctuary</a>, <a href=\"/requests/\">Requests</a>, <a href=\"/axios/\">Axios</a>" | |
| 5 | 5 | ], |
| 6 | 6 | [ |
| 7 | 7 | "2022-05-03", |
| @@ -106,6 +106,11 @@ credits = [ · 105 unmodified lines | ||
| 106 | 106 | '2010-2018 Caolan McMahon', |
| 107 | 107 | 'MIT', |
| 108 | 108 | 'https://raw.githubusercontent.com/caolan/async/master/LICENSE' |
| 109 | + ], [ | |
| 110 | + 'Axios', | |
| 111 | + '2014-present Matt Zabriskie', | |
| 112 | + 'MIT', | |
| 113 | + 'https://raw.githubusercontent.com/axios/axios/main/LICENSE' | |
| 109 | 114 | ], [ |
| 110 | 115 | 'Babel', |
| 111 | 116 | '2014-present Sebastian McKenzie', |
| @@ -0,0 +1,10 @@ | ||
| 1 | +module Docs | |
| 2 | + class Axios | |
| 3 | + class CleanHtmlFilter < Filter | |
| 4 | + def call | |
| 5 | + css('.links').remove | |
| 6 | + doc | |
| 7 | + end | |
| 8 | + end | |
| 9 | + end | |
| 10 | +end | |
| @@ -0,0 +1,13 @@ | ||
| 1 | +module Docs | |
| 2 | + class Axios | |
| 3 | + class EntriesFilter < Docs::EntriesFilter | |
| 4 | + def get_name | |
| 5 | + at_css('h1').content | |
| 6 | + end | |
| 7 | + | |
| 8 | + def get_type | |
| 9 | + 'axios' | |
| 10 | + end | |
| 11 | + end | |
| 12 | + end | |
| 13 | +end | |
| @@ -0,0 +1,26 @@ | ||
| 1 | +module Docs | |
| 2 | + class Axios < UrlScraper | |
| 3 | + self.type = 'simple' | |
| 4 | + self.links = { | |
| 5 | + home: 'hthttps://axios-http.com/', | |
| 6 | + code: 'https://github.com/axios/axios' | |
| 7 | + } | |
| 8 | + self.release = '0.27.2' | |
| 9 | + self.base_url = "https://axios-http.com/docs/" | |
| 10 | + self.initial_paths = %w(intro) | |
| 11 | + | |
| 12 | + html_filters.push 'axios/entries', 'axios/clean_html' | |
| 13 | + | |
| 14 | + options[:container] = 'main > .body' | |
| 15 | + | |
| 16 | + # https://github.com/axios/axios-docs/blob/master/LICENSE | |
| 17 | + options[:attribution] = <<-HTML | |
| 18 | + © 2020-present John Jakob "Jake" Sarjeant<br> | |
| 19 | + Licensed under the MIT License. | |
| 20 | + HTML | |
| 21 | + | |
| 22 | + def get_latest_version(opts) | |
| 23 | + get_latest_github_release('axios', 'axios', opts) | |
| 24 | + end | |
| 25 | + end | |
| 26 | +end | |
Binary file not shown.
Binary file not shown.
| @@ -0,0 +1 @@ | ||
| 1 | +https://raw.githubusercontent.com/axios/axios-docs/master/assets/favicon.png | |