{"id":16066093,"url":"https://github.com/quequeo/zype-api","last_synced_at":"2026-04-17T06:33:38.785Z","repository":{"id":192660052,"uuid":"304126764","full_name":"quequeo/zype-api","owner":"quequeo","description":"Zype Api App - Videos","archived":false,"fork":false,"pushed_at":"2020-10-23T14:41:22.000Z","size":171,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-13T02:56:26.786Z","etag":null,"topics":["api","heroku","low-level","rails","scheduler","sidekiq","zype"],"latest_commit_sha":null,"homepage":"https://zypechallenge.herokuapp.com/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quequeo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-10-14T20:22:20.000Z","updated_at":"2020-11-30T04:27:56.000Z","dependencies_parsed_at":"2023-09-06T11:31:40.377Z","dependency_job_id":null,"html_url":"https://github.com/quequeo/zype-api","commit_stats":null,"previous_names":["jeimon83/zype-api","sunny-code-apps/zype-api","quequeo/zype-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/quequeo/zype-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quequeo%2Fzype-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quequeo%2Fzype-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quequeo%2Fzype-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quequeo%2Fzype-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quequeo","download_url":"https://codeload.github.com/quequeo/zype-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quequeo%2Fzype-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31918605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","heroku","low-level","rails","scheduler","sidekiq","zype"],"created_at":"2024-10-09T05:22:51.385Z","updated_at":"2026-04-17T06:33:38.752Z","avatar_url":"https://github.com/quequeo.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Documentation for the Zype API is available here: ​ https://docs.zype.com/reference\n\nProject\n-\nhttps://zypechallenge.herokuapp.com/\n\nInstall\n-\nClone the repository\n\ngit clone https://github.com/jeimon83/zype-challenge.git\n\ncd zypechallenge\n\nCheck your Ruby version\n\nruby -v\n\nThe ouput should start with something like ruby 2.7.1\n\nIf not, install the right ruby version using rbenv (it could take a while):\n\nrbenv install 2.7.1\nInstall dependencies\nUsing Bundler and Yarn:\n\nbundle \u0026\u0026 yarn\nSet environment variables: ZYPE_APP_KEY, ZYPE_BASE_URL, ZYPE_CLIENT_ID, ZYPE_CLIENT_SECRET, ZYPE_LOGIN_URL, SIDEKIQ_USERNAME, SIDEKIQ_PASSWORD\n\nInitialize the database\n-\nrails db:create db:migrate\n\nRun scheduler\n-\nrake scheduler:fetch_videos_from_zype\n\nAdd heroku remotes\n-\nUsing Heroku CLI\nheroku https://git.heroku.com/zypechallenge.git --remote heroku\n\nServe\n-\nrails s \u0026 bundle exec sidekiq\n\nDeploy\n-\nDirectly to production (not recommended)\nPush to Heroku production remote: git push heroku master\n\n# ZYPE CHALLENGE - DEPLOYED IN HEROKU https://zypechallenge.herokuapp.com/\n\nRuby 2.7.1\nRails 6.0.3\nPostgreSQL\n\nHigh level architecture overview\n-\nRails 6 app that retrieves videos from Zype API every hour using rake tasks and allows users to view content online.\nAutomate action for fetching videos from zype every one hour to improve user experience, some data of the videos is recorded, such as their id, title, thumbnail url, subscription and the path of the embedded player. Some videos require subscription, so API Consumer credentials are needed in order to view that content\nIn order to match the access token with the right consumer, the Zype access tokens persists through low level caching, and consumers emails persist with session[:email] variable.\n\nService Objects:\n- \nDifferent services are created to connect to the Zype Api, so that all the videos can be listed for later recording in the database, as well as checking the right of a user to view certain content.\n\nClient: app/services/zype/client\nVideos: app/services/zype/videos\nConsumer: app/services/zype/consumer\nOauth: app/services/zype/oauth\n\nZype Access Token:\n-\nSometimes you need to cache a particular value or query result instead of caching view fragments. Rails' caching mechanism works great for storing any kind of information. In this case, the app supports multiple users while saving the zype access token using rails low level caching (read \u0026 write data to key-value store)\n\nModels:\n-\nVideos -\u003e Id, Title, Embed player Url, subscription, thumbnail\n\nThird-party Gems:\n-\n**Dotenv-rails: load environment variables from .env into ENV in development\n\n**Sidekiq: background jobs. in this case, for the Zype Video Fetcher Worke\n\n**Bootstrap: css styles to improve front end UI\n\n**Typhoeus: useful gem to make fast and reliable requests\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquequeo%2Fzype-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquequeo%2Fzype-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquequeo%2Fzype-api/lists"}