Skip to content
Projects Vue.js Projects
Vue API Query

Vue API Query

Elegant and simple way to build requests for REST API

6.2K viewsAdded Mar 3, 2019

This package helps you quickly to build requests for REST API. Move your logic and backend requests to dedicated classes. Keep your code clean and elegant.

Basic usage

Give me the result for a given criteria, include some entities, append extra fields and order the result

// GET /posts?filter[status]=ACTIVE&include=user,category&append=likes&orderBy=-created_at,category_id

let posts = await Post
  .where('status', 'ACTIVE')
  .include('user', 'category')
  .append('likes')
  .orderBy('-created_at', 'category_id')
  .get()

Just give me the first occurrence from response:

// GET /posts?filter[status]=ACTIVE

let post = await Post
  .where('status', 'ACTIVE')
  .first()

Nice! Now I want a specific object:

// GET /posts/1

let post = await Post.find(1)

Edit this and send it back:

// PUT /posts/1

post.title = 'Awsome!'
post.save()

Ops, delete it!

// DELETE /posts/1

post.delete()
WP Vue

WP Vue

A Vue blog template that displays posts from any WordPress REST API endpoint

2.5K views

Vue.js Projects

A hand-picked collection of projects made with Vue.js: UI components, input elements, apps, plugins, examples and frameworks.

Newsletter

Get the best new Vue projects in your inbox.

© 2026 vuejsprojects.com