Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

bambalaam-archive/FAMOCO-trial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FAMOCO-trial

Installation

(sudo) apt install python-m2crypto aapt
pip install -r requirements.txt
python manage.py makemigrations apks
python manage.py migrate
python manage.py createsuperuser

Running server

python manage.py runserver

Exploring the website

The very basic and barebones website is available at:

http://127.0.0.1:8000

API Calls

Root of the API

The API Root is available at the following address:

http://127.0.0.1:8000/apks/api/

It is browsable through hyperlinks in the resulting JSON.

List all available APKs

Either through the API viewer on the website:

http://127.0.0.1:8000/apks/api/list/

Or through a CURL call:

curl http://127.0.0.1:8000/apks/api/list/

Get specific APK by ID

Either through the API viewer on the website:

http://127.0.0.1:8000/apks/api/list/<index>/

Or through a CURL call:

curl http://127.0.0.1:8000/apks/api/list/<index>/

Delete specific APK by ID

Either through the API viewer on the website, at the same page as above. If the user has ownership of the uploaded APK (or is a superuser), a red button saying "DELETE" will appear on the API viewer.

Or through a CURL call:

curl -u <username> http://127.0.0.1:8000/apks/api/list/<index>/ -X "DELETE"

After this call, the user will be prompted to enter the password for the username provided.

Upload APK

It is necessary to register an account on the website before being able to upload an APK.

For the upload itself, two methods are possible. The first one is to upload it through the website, the other one is through a CURL call.

This is the preferred syntax, others are possible though:

curl -u <username> http://127.0.0.1:8000/apks/api/upload/ --upload-file <path-to-file>

After this call, the user will be prompted to enter the password for the username provided.

List all users

Either through the API viewer on the website:

http://127.0.0.1:8000/apks/api/users/

Or through a CURL call:

curl http://127.0.0.1:8000/apks/api/users/

Get specific User by ID

Either through the API viewer on the website:

http://127.0.0.1:8000/apks/api/users/<index>/

Or through a CURL call:

curl http://127.0.0.1:8000/apks/api/users/<index>/

TO DO

  • Remove extra images that are generated

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published