All Projects → goschevski → Apy

goschevski / Apy

Apy is a simple client-side library for making rest api ajax calls.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Apy

Spyke
Interact with REST services in an ActiveRecord-like manner
Stars: ✭ 591 (+769.12%)
Mutual labels:  api, rest-api, rest
Api Strategy
Equinor API Strategy
Stars: ✭ 56 (-17.65%)
Mutual labels:  api, rest-api, rest
Rest Api Nodejs Mongodb
A boilerplate for REST API Development with Node.js, Express, and MongoDB
Stars: ✭ 672 (+888.24%)
Mutual labels:  api, rest-api, rest
Acf To Rest Api
Exposes Advanced Custom Fields Endpoints in the WordPress REST API
Stars: ✭ 1,152 (+1594.12%)
Mutual labels:  api, rest-api, rest
Generator Http Fake Backend
Yeoman generator for building a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
Stars: ✭ 49 (-27.94%)
Mutual labels:  api, rest-api, rest
Networking
⚡️ Elegantly connect to a REST JSON Api. URLSession + Combine + Decodable + Generics = <3
Stars: ✭ 499 (+633.82%)
Mutual labels:  api, rest-api, rest
Cookiecutter Django Rest
Build best practiced apis fast with Python3
Stars: ✭ 1,108 (+1529.41%)
Mutual labels:  api, rest-api, rest
Kanary
A minimalist web framework for building REST APIs in Kotlin/Java.
Stars: ✭ 319 (+369.12%)
Mutual labels:  api, rest-api, rest
Axios Rest
A simple axios wrapper to make rest api call delightful
Stars: ✭ 41 (-39.71%)
Mutual labels:  api, rest-api, rest
Discord4j
Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.
Stars: ✭ 973 (+1330.88%)
Mutual labels:  api, rest-api, rest
Openapi Generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Stars: ✭ 10,634 (+15538.24%)
Mutual labels:  api, rest-api, rest
Json Api Dart
JSON:API client for Dart/Flutter
Stars: ✭ 53 (-22.06%)
Mutual labels:  api, rest-api, rest
Javacord
An easy to use multithreaded library for creating Discord bots in Java.
Stars: ✭ 368 (+441.18%)
Mutual labels:  api, rest-api, rest
Rest Hapi
🚀 A RESTful API generator for Node.js
Stars: ✭ 1,102 (+1520.59%)
Mutual labels:  api, rest-api, rest
Zoonavigator
Web-based ZooKeeper UI / editor / browser
Stars: ✭ 326 (+379.41%)
Mutual labels:  api, rest, browser
Apidoc
RESTful API 文档生成工具,支持 Go、Java、Swift、JavaScript、Rust、PHP、Python、Typescript、Kotlin 和 Ruby 等大部分语言。
Stars: ✭ 785 (+1054.41%)
Mutual labels:  api, rest-api, rest
Httpie
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+77917.65%)
Mutual labels:  api, rest-api, rest
Vulcain
Fast and idiomatic client-driven REST APIs.
Stars: ✭ 3,190 (+4591.18%)
Mutual labels:  api, rest-api, rest
Ngx Restangular
Restangular for Angular 2 and higher versions
Stars: ✭ 787 (+1057.35%)
Mutual labels:  api, rest-api, rest
Rest Control
Framework for testing and validation REST services
Stars: ✭ 51 (-25%)
Mutual labels:  api, rest-api, rest

Apy

Build Status

Apy is a simple client-side library for making REST API AJAX calls. It supports both callback and promises.

API

all ([params], [callback])

Params

  • params (object): serialized and appended as a querystring to the url
  • callback (function): triggered when the request is done

Returns

  • promise: Returns the Promise.

find (id, [params], [callback])

Params

  • id (string|number): id of resource appended to the url
  • params (object): serialized and appended as a querystring to the url
  • callback (function): triggered when the request is done

Returns

  • promise: Returns the Promise.

save (data, [params], [callback])

Params

  • data (object): sent as body of the request
  • params (object): serialized and appended as a querystring to the url
  • callback (function): triggered when the request is done

Returns

  • promise: Returns the Promise.

update (id, data, [params], [callback])

Params

  • id (string|number): id of resource appended to the url
  • data (object): sent as body of the request
  • params (object): serialized and appended as a querystring to the url
  • callback (function): triggered when the request is done

Returns

  • promise: Returns the Promise.

destroy (id, [params], [callback])

Params

  • id (string|number): id of resource appended to the url
  • params (object): serialized and appended as a querystring to the url
  • callback (function): triggered when the request is done

Returns

  • promise: Returns the Promise.

Examples

First define resource

var PeopleApi = new Apy({
    base: '/api/v3/people'
});

So let's fetch all nice developers

PeopleApi.all({ kind: 'nice', job: 'developer' }, function (err, data) {
    if (!err) {
        console.log(data);
    }
});

GET request to /api/v3/people/?kind=nice&job=developer

Or we can fetch all developers even if they are not nice...

PeopleApi.all().then((data) => {
    console.log(data);
}).catch((err) => {
    console.log(err);
});
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].