Giter Site home page Giter Site logo

mohammed-rampurawala / fonoapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jesusperiago/fonoapi

0.0 2.0 0.0 19 KB

FonoApi - Mobile Device Description API

Home Page: https://fonoapi.freshpixl.com

License: MIT License

PHP 55.60% Python 44.40%

fonoapi's Introduction

FonoApi - Mobile Device Description Api

https://fonoapi.freshpixl.com/

this is an Api which can provide mobile device descriptions such as model, brand, cpu, gpu, dimensions, release date etc...

this is the php class to communicate with the api. it would be nice if someone can help with other languages though. ;)

Api

Api Url : https://fonoapi.freshpixl.com/v1/

available options

  • brand - pass the Mobile Device Brand (example : "samsung", "htc")
  • device* - pass nearly relevent mobile device name (example : "i9305", "A8") this might result multiple results at a time.
  • position - when a set of results is returned you can get a specific device by passing the position of your device on the result set. count starts from 0
  • token* -
PHP Demo
<?php

	include_once("fonoapi-v1.php");

	$apiKey = "xxxxxxxx"; // get your token key here - https://fonoapi.freshpixl.com
	$fonoapi = fonoApi::init($apiKey);
	
		try {

			$res = $fonoapi::getDevice("i9305"); // the device you need to get details here

			foreach ($res as $mobile) {
				if (!empty($mobile->DeviceName)) 	echo "Device : ". $mobile->DeviceName . "<br>";
				if (!empty($mobile->Brand)) 		echo "Brand : ". $mobile->Brand . "<br>";
				if (!empty($mobile->cpu)) 			echo "Cpu : " . $mobile->cpu . "<br>";
				if (!empty($mobile->status)) 		echo "Status : " . $mobile->status . "<br>";
				if (!empty($mobile->dimensions)) 	echo "Dimensions : " . $mobile->dimensions . "<br>";
				if (!empty($mobile->_4g_bands)) 	echo "4g : " .$mobile->_4g_bands . "<br>";
			}

		} catch (Exception $e) {
			echo "ERROR : " . $e->getMessage();
		}

?>
Python Demo
	from fonAPI import FonApi
	
	fon = FonApi('yourkey')
	
	device = 'nokia 3210'
	
	phones = fon.getdevice(device)
	try:
	    for phone in phones:
	        print phone['DeviceName']
	        print phone['weight']
	        print phone['resolution']
	except:
	    print phones
Result Array Description

Note : Use a "_" before key if the key is starting with a number (example : _2g_bands, _4g_bands)

  • DeviceName
  • Brand
  • technology
  • 2g_bands
  • gprs
  • edge
  • announced
  • status
  • dimensions
  • weight
  • sim
  • type (display type)
  • size
  • resolution
  • card_slot
  • phonebook
  • call_records
  • camera_c (camera availablity)
  • alert_types
  • loudspeaker_
  • 3_5mm_jack_
  • sound_c (Sound Quality)
  • wlan
  • bluetooth
  • gps
  • infrared_port
  • radio
  • usb
  • messaging
  • browser
  • clock
  • alarm
  • games
  • languages
  • java
  • features_c (additional features sperated by "-")
  • battery_c (battery information)
  • stand_by (standby time)
  • talk_time (standby time)
  • colors (available colors)
  • sensors
  • cpu
  • internal (memory + RAM)
  • os
  • body_c (body features seperated by "-")
  • keyboard
  • primary_ (primary camera)
  • video
  • secondary (secondary camera)
  • 3g_bands
  • speed
  • network_c
  • chipset
  • features (additional features seperated by "-")
  • music_play
  • protection
  • gpu
  • multitouch
  • loudspeaker
  • audio_quality
  • nfc
  • camera
  • display
  • battery_life
  • 4g_bands

fonoapi's People

Contributors

shakee93 avatar jesusperiago avatar

Watchers

James Cloos avatar Mohammed Rampurawala 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.