flip_store_github.h 1.1 KB

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include <flip_store.h>
  3. /*
  4. I did try downloading a zip file from Github but a few issues
  5. - unsure how to unzip the file
  6. - either Github redirected us to a loading page, or their was no response on if using an IoT device
  7. - any contributions to this would be appreciated
  8. */
  9. // Helper to download a file from Github and save it to the storage
  10. bool flip_store_download_github_file(
  11. FlipperHTTP *fhttp,
  12. const char *filename,
  13. const char *author,
  14. const char *repo,
  15. const char *link);
  16. // Helper to get the contents of a Github repo (from https://api.github.com/repos/author/repo/contents)
  17. bool flip_store_get_github_contents(FlipperHTTP *fhttp, const char *author, const char *repo);
  18. // Helper to parse the contents of a Github repo (takes parts of the data and saves it for easy access later)
  19. bool flip_store_parse_github_contents(char *file_path, const char *author, const char *repo);
  20. // Helper to install all files from the parsed Github repo contents in flip_store_parse_github_contents
  21. bool flip_store_install_all_github_files(FlipperHTTP *fhttp, const char *author, const char *repo);