npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@airplanegobrr/fmd-js-api

v1.0.3

Published

An API for FMD!

Downloads

11

Readme

@airplanegobrr/fmd-js-api

This is an API for the FMD Server (Version 0.5.0)

Android app: FMD App

I've been working on this project on and off for around 3+++ months.

Yeah I know, I am really bad with cryptography so thats why it took so long.

This uses the Modern encrytion, the API is based off the scripts found in FMD Server Web and looking at the network logs

This uses axios, argon2 (Making sure to set argon2.limits.timeCost.min to 1, no clue what that means) and @peculiar/webcrypto

This also has JsDocs so IntelliSense works!

If you like this project please make sure to :star: (star) it, it would mean alot to me :D

PR's and Issues are welcome!

How to use

const FMD_API = require("@airplanegobrr/fmd-js-api")

let fmdAPI = new FMD_API("<deviceID>", "<password>", {
    url: "https://fmd.nulide.de:1008/" // Defaults to https://fmd.nulide.de:1008/ if none is supplied
})

fmdAPI.login().then(async (data)=>{
    // Data has an object with accessToken and privateKey, You really dont need to use these but it's nice to have incase

    await fmdAPI.commands.locate() // Tells the device to send its current location to the server, might take awhile for the device to send its loction back to the server.

    let location = fmdAPI.locate(-1) // Gets the lastest location, keep in mind this will NOT ask for the device for its current location, it asks the server what the last location the device sent to the server!
    console.log(location)

    // fmdAPI.commands also has some commands like:
    // locate
    // locate_gps
    // locate_cell
    // locate_last
    // ring
    // lock
    // camera_front
    // camera_back

    let picCount = await fmdAPI.getPictureCount() // Get ammount of pictures the server has
    let picBuffer = await fmdAPI.getPicture(picCount) // Takes the picture index (biggest number == lastest)
    console.log(picCount, picBuffer)
})

FAQ

  • Q: How do I get a list of devices the server has?
  • A: You can't, that would be a big security risk, it would be nice if it were available for private server but its not
  • Q: How do I delete my device?
  • A: This is a big risk, I didn't add it as again its a risk- if you want to do it do fmdAPI.sendToPhone("delete <pin>"), this will NOT be added to the commands object- too risky

Note:

I HATE CRYPTO, I HATE CRYPTO, I HATE CRYPTO, I HATE CRYPTO, I HATE CRYPTO, I HATE CRYPTO!!!