Giter VIP home page Giter VIP logo

adease-api's Introduction

AdEase API

This project is designed to serve as a MVP for Adease. Built with Python, Flask, Celery, Redis & MongoDB

Configuration

Below are the steps required to run this app

Create a virtual env and activate it

python3 -m venv /path-to-project/venv
source ./venv/bin/activate

Install requirements pip install -r requirements.txt

Run flask app (in debug mode) python run.py

Run celery task queue (in debug mode) celery worker -A app.celery --loglevel=debug

Setup mongoDb, redis and update urls in constants.py

CRUD Operations

Create - /api/v1/ad/add - POST

Key -

data: {
    destination_url: String,
    headline: String(30),
    primary_text: String(120),
    name: String,
    type: 'IMAGE_AD' or 'VIDEO_AD'
}

Minified Sample Value -

data -

[{"destination_url":"https://imgur.com/gallery/YZ1yC5a","headline":"Imgur Ad","name":"Ad no 02","primary_text":"Some random image meme","type":"IMAGE_AD"},{"destination_url":"https://www.youtube.com/watch?v=8sjm7eeat-4","headline":"Calculated or Random Ad","name":"Ad no 52","primary_text":"Dota Channel","type":"VIDEO_AD"},{"destination_url":"https://www.youtube.com/watch?v=3Efm5rdzJ-E","headline":"Calculated or Random Ad","name":"Ad no 58","type":"VIDEO_AD"},{"destination_url":"https://www.youtube.com/watch?v=vRhhS6BnLSY","headline":"Calculated or Random Ad","name":"Ad no 55","type":"VIDEO_AD"},{"destination_url":"https://www.youtube.com/watch?v=zUb0pAN_uNE","headline":"Calculated or Random Ad","name":"Ad no 54","type":"VIDEO_AD"}]

Read - /api/v1/ad/ - GET

Update - /api/v1/ad/update - POST PUT

Key -

name: String,
replace: {
    destination_url: String,
    headline: String(30),
    primary_text: String(120),
    name: String,
    type: 'IMAGE_AD' or 'VIDEO_AD'
}

Minified Sample Value -

name - Ad no 24 replace -

{"content_url":"https://imgur.com/gallery/4nv4xRN","created_at":"2022-02-09 15:15:33.040172","destination_url":"https://imgur.com/gallery/4nv4xRN","headline":"xqnajxfpcxcdfkozuhnj Ad","meta_data":"","name":"Ad no 91","primary_text":"vcpmjkdkdhtunannkcrogucllkbcnjpxbufqvozqyojffjamlbyzjgndcwgkmynuonamsjvpucgjkmoqkfplpyqsvvsaqxvvkdqc","type":"IMAGE_AD","updated_at":"2022-02-09 15:15:33.040174"}

Delete - /api/v1/ad/delete - DELETE

Random Data Generation - /api/v1/ad/random - POST

Key -

size: Integer

Minified Sample Value - size - 30

LICENSE

MIT License

Copyright (c) 2022 Raajesh

adease-api's People

Contributors

raajeshmani avatar

Watchers

James Cloos 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.