diff --git a/README.md b/README.md new file mode 100644 index 0000000..d63c20d --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +Snipe-IT API +============ + +This is a simple API for accessing a Snipe-IT database. + + +Installing +---------- + +Installation is easy. Assuming you have a web server with PHP and a suitable +database driver, simply put all the files in this repo in a web-accessible +folder. + +Edit the file database.php and add the connection settings for your Snipe-IT +database. + +On the mobile app, enter the full address for the API server. Include +`http(s)://` and the trailing slash. + +The API can be put in a subfolder of the main Snipe-IT installation, but it can +also be setup on any server that can reach the database. + +Troubleshooting +--------------- + +If you have a problem: + +* Check you have the full path (with trailing slash) entered into the app. +* Install PHP Composer and run `composer install`. +* Check you can access the API from a computer. Go to the API folder/login.php. + You should see JSON with an error message "Missing username.". If you see + a different error, or there is no error, double-check the database settings, + and try installing Composer dependencies. +* If none of these solutions work, open an issue. \ No newline at end of file diff --git a/composer.json b/composer.json old mode 100644 new mode 100755 index dfcbc4c..1a2bc1b --- a/composer.json +++ b/composer.json @@ -1,10 +1,10 @@ { - "name": "vendor/snipe-i-t-mobile-a-p-i", - "description": "Description of project SnipeITMobileAPI.", + "name": "netsyms/snipeit-mobile-api", + "description": "Mobile API server for SnipeIT.", "authors": [ { - "name": "skylar", - "email": "your@email.here" + "name": "Skylar Ittner", + "email": "admin@netsyms.com" } ], "require": { diff --git a/composer.lock b/composer.lock old mode 100644 new mode 100755 diff --git a/database.php b/database.php old mode 100644 new mode 100755 diff --git a/dieifnotloggedin.php b/dieifnotloggedin.php old mode 100644 new mode 100755 diff --git a/getitem.php b/getitem.php old mode 100644 new mode 100755 diff --git a/getlocation.php b/getlocation.php old mode 100644 new mode 100755 diff --git a/getmodel.php b/getmodel.php old mode 100644 new mode 100755 diff --git a/getstatus.php b/getstatus.php old mode 100644 new mode 100755 diff --git a/login.php b/login.php old mode 100644 new mode 100755 diff --git a/nbproject/project.properties b/nbproject/project.properties old mode 100644 new mode 100755 diff --git a/nbproject/project.xml b/nbproject/project.xml old mode 100644 new mode 100755 diff --git a/readfrom.php b/readfrom.php old mode 100644 new mode 100755 diff --git a/required.php b/required.php old mode 100644 new mode 100755 diff --git a/search.php b/search.php old mode 100644 new mode 100755 diff --git a/updateitem.php b/updateitem.php old mode 100644 new mode 100755 diff --git a/vendor/autoload.php b/vendor/autoload.php old mode 100644 new mode 100755 diff --git a/vendor/catfan/medoo/.gitattributes b/vendor/catfan/medoo/.gitattributes old mode 100644 new mode 100755 diff --git a/vendor/catfan/medoo/.gitignore b/vendor/catfan/medoo/.gitignore old mode 100644 new mode 100755 diff --git a/vendor/catfan/medoo/LICENSE b/vendor/catfan/medoo/LICENSE old mode 100644 new mode 100755 diff --git a/vendor/catfan/medoo/README.md b/vendor/catfan/medoo/README.md old mode 100644 new mode 100755 diff --git a/vendor/catfan/medoo/composer.json b/vendor/catfan/medoo/composer.json old mode 100644 new mode 100755 diff --git a/vendor/catfan/medoo/medoo.php b/vendor/catfan/medoo/medoo.php old mode 100644 new mode 100755 diff --git a/vendor/catfan/medoo/src/medoo-logo.png b/vendor/catfan/medoo/src/medoo-logo.png old mode 100644 new mode 100755 diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php old mode 100644 new mode 100755 diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE old mode 100644 new mode 100755 diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php old mode 100644 new mode 100755 diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php old mode 100644 new mode 100755 diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php old mode 100644 new mode 100755 diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php old mode 100644 new mode 100755 diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php old mode 100644 new mode 100755 diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php old mode 100644 new mode 100755 diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json old mode 100644 new mode 100755