Giter Site home page Giter Site logo

listennotes / listenapidemo Goto Github PK

View Code? Open in Web Editor NEW
61.0 2.0 8.0 934 KB

A simplified podcast search engine web app, using Django, React, and Listen Notes Podcast API.

Home Page: https://PodcastAPI.com

License: Apache License 2.0

Python 6.31% HTML 2.18% JavaScript 86.68% Less 4.83%
podcast api podcastapp django react django-backend web-frontend demo

listenapidemo's Introduction

ListenApiDemo

Apache 2 Demo CI

A simplified podcast search engine web app, using Django, React, and Listen API.

In the Django code, we use our official podcast api package to talk to Listen API.

You can find code snippets in different languages on the API Docs page, including Node.js, Python, Ruby, Java, PHP, Golang, Kotlin...

Note: You can easily implement similar apps using Cloudflare Pages, or no code tools like Bubble and Retool.

Overview

Your frontend code (e.g., Web, iOS, Android...) shouldn't talk to Listen API directly. For Web, your users can inspect request headers in their web browsers to find your API key, if you use Ajax to hit Listen API endpoints directly. For iOS / Android, you can't easily reset your API key, if you put API keys in the source code of your app. Once the app is in the hands of your users, you can't easily change the code or force users to upgrade.

Typically, you'll hit Listen API endpoints from your backend (e.g., Django, Rails, Nodejs, Cloudflare Workers...). So you can protect your API key and reset it if needed. Your frontend code will talk to your backend via GraphQL, RESTful APIs or the likes.

In this demo, we provide a reference Django implementation for a backend that talks to Listen API, and a ReactJs implementation for a web frontend that talks to the Django backend.

Running the project

The backend is a simple Django backend makes requests to the Listen API. To run it, from the backend directory:

  1. Install requirements (it is recommended you do this in a virtualenv):
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
  1. Start the django app with the environment variable LISTEN_API_KEY set to your Listen API key:
LISTEN_API_KEY=YOUR_SECRET_KEY python manage.py runserver

Where to get LISTEN_API_KEY?

If LISTEN_API_KEY is not set, then we'll use the API mock server that returns fake data.

The web frontend is a React project that makes requests to the django backend. To run it, from the web directory:

  1. Install requirements:
yarn install
  1. Start the React app with the environment variable REACT_APP_BACKEND_ROOT_URL set to your Django backend's base url:
REACT_APP_BACKEND_ROOT_URL=http://localhost:8000 yarn start

On desktop

Desktop demo

On mobile

Mobile demo

Further readings

What have 4,500+ companies & developers built with Listen Notes Podcast API:

listenapidemo's People

Contributors

arkadyark avatar dependabot[bot] avatar wenbinf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.