fastapi.rb 829 B

12345678910111213141516171819202122232425262728293031
  1. module Docs
  2. class Fastapi < UrlScraper
  3. self.name = 'FastAPI'
  4. self.type = 'fastapi'
  5. self.release = '0.95.0'
  6. self.base_url = 'https://fastapi.tiangolo.com/'
  7. self.root_path = '/'
  8. self.links = {
  9. home: 'https://fastapi.tiangolo.com/',
  10. code: 'https://github.com/tiangolo/fastapi'
  11. }
  12. options[:only_patterns] = [
  13. /\Afeatures\//, /\Apython-types\//,
  14. /\Atutorial\//, /\Aadvanced\//, /\Aasync\//,
  15. /\Adeployment\//, /\Aproject-generation\//
  16. ]
  17. html_filters.push 'fastapi/container', 'fastapi/clean_html', 'fastapi/entries'
  18. options[:attribution] = <<-HTML
  19. &copy; 2018 Sebastián Ramírez<br>
  20. Licensed under the MIT License.
  21. HTML
  22. def get_latest_version(opts)
  23. get_latest_github_release('tiangolo', 'fastapi', opts)
  24. end
  25. end
  26. end