Skip to content

This is a Python wrapper for the FileMoon API. It allows you to interact with various endpoints of the FileMoon service to manage files, accounts, and other related operations.

License

Notifications You must be signed in to change notification settings

BalaPriyan/filemoon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileMoon is a video hosting service were you can upload videos, share & make money.

Don't Have Account? Register Here

Features

- HLS Streaming - Unlimited Storage - Faster Encoding - Subtitles Support - Premium bandwidth

FileMoon API Python Wrapper

This is a Python wrapper for the FileMoon API. It allows you to interact with various endpoints of the FileMoon service to manage files, accounts, and other related operations.

Table of Contents

Installation

pip install filemoon

Usage

from filemoon import FileMoon

# Initialize with your API key
filemoon = FileMoon(api_key='YOUR_API_KEY')

# Get account info
info = filemoon.info()
print(info)

Methods

Account Information

Get basic info of your account
info = filemoon.info()
print(info)

Account Statistics

Get reports of your account (default last 7 days)
stats = filemoon.stats(last='7')
print(stats)

DMCA List

Get DMCA reported files list (500 results per page)
dmca = filemoon.dmca(last='7')
print(dmca)

Deleted Files List

Get deleted files list (500 results per page)
deleted = filemoon.deleted(last='7')
print(deleted)

Remote Upload

Upload files using direct links
upload = filemoon.remote_upload(direct_link='https://example.com/file.mp4')
print(upload)

Optional parameter fld_id can be used to specify the folder ID.

upload = filemoon.remote_upload(direct_link='https://example.com/file.mp4', fld_id='FOLDER_ID')
print(upload)

Remove Remote Upload

To remove remote upload
remove = filemoon.remove_rup(file_code='FILE_CODE')
print(remove)

Remote Upload Status

To check remote upload status
status = filemoon.rup_status(file_code='FILE_CODE')
print(status)

File Information

To get file information
f_info = filemoon.f_info(file_code='FILE_CODE')
print(f_info)

File List

To list files
f_list = filemoon.f_list(name='example', per_page='10', page='1')
print(f_list)

Optional parameters:

  • fld_id: Folder ID to list files from
  • name: To fetch a file by name
  • created: To fetch by created date
  • public: To fetch by public media
  • per_page: To fetch by per page
  • page: To fetch by page

Clone File

To clone a file
clone = filemoon.clone_f(file_code='FILE_CODE')
print(clone)

Optional parameter fld_id can be used to specify the folder ID.

clone = filemoon.clone_f(file_code='FILE_CODE', fld_id='FOLDER_ID')
print(clone)

Folder List

To get folder list
folders = filemoon.fld_list(fld_id='FOLDER_ID')
print(folders)

Optional parameter fld_id can be used to specify the folder ID.

Create Folder

To create a folder
new_folder = filemoon.create_fld(name='New Folder')
print(new_folder)

Optional parameter parent_id can be used to specify the parent folder ID.

new_folder = filemoon.create_fld(name='New Folder', parent_id='PARENT_ID')
print(new_folder)

Encoding Operations

Get encoding list
encoding_list = filemoon.en_list()
print(encoding_list)
Get encoding status
status = filemoon.en_status(file_code='FILE_CODE')
print(status)
Restart encoding error files
restart = filemoon.restart_en_error(file_code='FILE_CODE')
print(restart)
Delete encoding error files
delete = filemoon.delete_en_error(file_code='FILE_CODE')
print(delete)

Image Operations

Get thumbnail image URL
thumbnail = filemoon.thumb(file_code='FILE_CODE')
print(thumbnail)
Get splash image
splash = filemoon.splash(file_code='FILE_CODE')
print(splash)

Video Preview

Get video preview of specific file
preview = filemoon.vid_preview(file_code='FILE_CODE')
print(preview)

Remote Subtitle Management

Add a remote subtitle
subtitle = filemoon.r_sub(subnum='1', sub_url='https://example.com/subtitle.srt', sub_name='English Subtitles')
print(subtitle)
Add remote subtitle in JSON format
json_subtitle = filemoon.r_subjs(sub_js='{"subtitles": [{"url": "https://example.com/subtitle.srt", "label": "English"}]}')
print(json_subtitle)
Add a remote poster
poster = filemoon.r_post(r_post='https://example.com/poster.jpg')
print(poster)
Add a remote logo
logo = filemoon.r_logo(r_logo='https://example.com/logo.png')
print(logo)

Server Management

Get upload server URL
upload_server = filemoon.up_server()
print(upload_server)

License

This project is licensed under the MIT License.

Contributing

Feel free to submit issues and pull requests to improve the codebase. All contributions are welcome!

Author

Your Name - BalaPriyan


About

This is a Python wrapper for the FileMoon API. It allows you to interact with various endpoints of the FileMoon service to manage files, accounts, and other related operations.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages