All Projects → asduser → webApi-angularjs

asduser / webApi-angularjs

Licence: other
⚓ Definitely simplifies your work with server side & organizes webApi layout to further managing.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to webApi-angularjs

wulaphp
一个有点复杂的PHP框架!
Stars: ✭ 26 (+73.33%)
Mutual labels:  module, service
Meiam.system
.NET 5 / .NET Core 3.1 WebAPI + Vue 2.0 + RBAC 企业级前后端分离权限框架
Stars: ✭ 340 (+2166.67%)
Mutual labels:  service, webapi
react-native-redux-boilerplate
React Native Redux Boiler Plate
Stars: ✭ 38 (+153.33%)
Mutual labels:  front-end, service
ngx-localstorage
An Angular wrapper for localstorage/sessionstorage access.
Stars: ✭ 27 (+80%)
Mutual labels:  module, service
Beehive
🐝 BeeHive is a solution for iOS Application module programs, it absorbed the Spring Framework API service concept to avoid coupling between modules.
Stars: ✭ 4,117 (+27346.67%)
Mutual labels:  module, service
Tinypart
TinyPart is an iOS modularization framework implemented by Ojective-C. It also supports URL-routing and inter-module communication. TinyPart是一个由Objective-C编写的面向协议的iOS模块化框架,同时它还支持URL路由和模块间通信机制。
Stars: ✭ 120 (+700%)
Mutual labels:  module, service
ProtocolServiceKit
iOS组件通信中间件(Protocol Service),Adapter Swift/Objective-C
Stars: ✭ 139 (+826.67%)
Mutual labels:  module, service
OnionArchitecture
The onion architecture, introduced by Jeffrey Palermo, overcomes the issues of the layered architecture with great ease. With Onion Architecture, the game-changer is that the Domain Layer (Entities and Validation Rules that are common to the business case ) is at the Core of the Entire Application. This means higher flexibility and lesser coupli…
Stars: ✭ 314 (+1993.33%)
Mutual labels:  webapi
intuit-spring-cloud-config-inspector
Inspection of Spring Cloud Config properties made easy using React
Stars: ✭ 18 (+20%)
Mutual labels:  service
chrly
Lightweight implementation of Minecraft skins system server. It's packaged and distributed as a Docker image.
Stars: ✭ 23 (+53.33%)
Mutual labels:  service
neomo
Neomorphism(neumorphism) Design Framework Open Source
Stars: ✭ 38 (+153.33%)
Mutual labels:  front-end
puppetlabs-puppetdb
A puppet module for installing and managing puppetdb
Stars: ✭ 52 (+246.67%)
Mutual labels:  module
mqtt-android-tutorial
A tutorial for using the MQTT Android Service.
Stars: ✭ 37 (+146.67%)
Mutual labels:  service
lion
A simple, modular Discord bot from scratch
Stars: ✭ 15 (+0%)
Mutual labels:  service
FastEndpoints
A light-weight REST API development framework for ASP.Net 6 and newer.
Stars: ✭ 2,386 (+15806.67%)
Mutual labels:  webapi
front-end-challenge
Challenge for those seeking a role as a front-end developer @amarofashion
Stars: ✭ 97 (+546.67%)
Mutual labels:  front-end
ms-identity-javascript-angular-spa-aspnetcore-webapi
An Angular single-page application that authenticates users with Azure AD and calls a protected ASP.NET Core web API using MSAL Angular
Stars: ✭ 72 (+380%)
Mutual labels:  webapi
LanguagePx
Easily Create Domain-Specific Languages (DSLs) in Windows PowerShell
Stars: ✭ 24 (+60%)
Mutual labels:  module
super-mario-message
Display custom messages in a Super Mario Bros environment
Stars: ✭ 18 (+20%)
Mutual labels:  service
InitKit
Neo-InitWare is a modular, cross-platform reimplementation of the systemd init system. It is experimental.
Stars: ✭ 364 (+2326.67%)
Mutual labels:  service

webApi module

Definitely simplifies your work with server side and organizes webApi layout to further managing.

A special template helps use in your code url in format: "api/manage/news/{query}/{pageSize}/{pageNumber}" as simple as it possible.

Image

How to use

  1. Go to webApi/categories/ directory.
  2. Create a new file, which will be responsible for some functional requests group to work with API. For example: if you have a lot of similar requests which contain some repeating code, just include them into appropriate category ( 'api/food/manage/{id}/delete', 'api/food/manage/{id}/update' -> foodManage.js).
  3. Fill each request using an existing template (see 'webApi/categories/account.js' file).
  4. Then add your created constant name into 'webApi/categories-handler/requests.js'.
  5. Now you may use new methods in application via special "InvokeName" parameter.
  6. To edit APi settings use "config/webApiSettings.js" file.

Samples

DOMAIN: http://yourdomain.com/

*** GET. Case #1 ***

// url -> http://yourdomain.com/admin/news/

// request
{ Url: 'admin/news/', CustomOptions: false, Method: 'get', InvokeName: 'getNews' }

// Invoke method.
webApi.getNews([]).success( // ...some actions...

*** GET. Case #2 ***

// url -> http://yourdomain.com/admin/news/3

// Declare request.
{ Url: 'admin/news/', CustomOptions: false, Method: 'get', InvokeName: 'getNewsDetailsById' }

// Invoke method.
webApi.getNewsDetailsById([3]).success( // ...some actions...

*** GET. Case #3 ***

// url -> http://yourdomain.com/admin/news/3/title

// Declare request.
{ Url: 'admin/news/{id}/title', CustomOptions: false, Method: 'get', InvokeName: 'getNewsDetailsById' }

// Invoke method.
webApi.getNewsDetailsById({
  url: { id: 3}
}).success( // ...some actions...

*** GET. Case #4 ***

// url -> http://yourdomain.com/admin/news/10?category=sport&period=week

// Declare request.
{ Url: 'admin/news', CustomOptions: false, Method: 'get', InvokeName: 'getNewsDetailsById' }

// Invoke method and specify an appropriate arguments.
webApi.getNewsDetailsById({
  before: ['10'],
  after: { "category": "sport", "period": "week" }
}).success( // ...some actions...

*** DELETE. Case #1 ***

// url -> http://yourdomain.com/admin/delete-user/10

// Declare request.
{ Url: 'admin/delete-user/{id}', CustomOptions: false, Method: 'delete', InvokeName: 'deleteUser' }

// Invoke method.
webApi.updateUser({
  url: { "id": 10 }
}).success( // ...some actions...

*** POST, PUT, UPDATE. Case #1 ***

// url -> http://yourdomain.com/api/login
// model -> { Login: "test", Password: "test1" }

// Declare request.
{ Url: 'api/login', CustomOptions: false, Method: 'post', InvokeName: 'login' }

// Invoke method.
var request = {
  Login: "test",
  Password: "test1"
};
webApi.login(request).success( // ...some actions...

*** POST, PUT, UPDATE. Case #2 ***

// url -> http://yourdomain.com/admin/manage/10/update
// model -> { "name": "Bob", "age": 20 }

// Declare request.
{ Url: 'admin/manage/{id}/{action}', CustomOptions: false, Method: 'put', InvokeName: 'updateUser' }

// Invoke method.
webApi.updateUser({
  url: { "id": 10, "action": "update" },
  data: { "name": "Bob", "age": 20 }
}).success( // ...some actions...

*** Sending a request options ***

To send a specific request options, foremost CustomOptions: true. in "requests.js". Then use a following syntax: You may specify there 'headers', 'responseType', 'timeout' etc. See https://docs.angularjs.org/api/ng/service/$http in section "Arguments" for details.

Case # 1. Inside array, the last argument - is an option object. Example:

webApi.getUserInfo([10, {"headers": {"Content-Type": "text/plain"} } ]);

Case # 2. If using an object, just designate an appropriate field within request. Example:

webApi.login({
  Login:'user',
  Password: 'pass',
  options: {"timeout": 100}
});

Licence

MIT License

Copyright (c) 2017 asduser

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].