Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/renehernandez/netconsole.webapi
https://github.com/renehernandez/netconsole.webapi
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/renehernandez/netconsole.webapi
- Owner: renehernandez
- License: mit
- Created: 2015-05-03T15:02:42.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-03-02T12:05:30.000Z (almost 7 years ago)
- Last Synced: 2024-11-17T14:51:05.467Z (about 1 month ago)
- Language: C#
- Size: 164 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# NetConsole.WebApi
NetConsole.WebApi is a package that it provides a way to access commands by using a sort of RPC-like API interaction.
Though it is possible to use this package as standalone web api, it is designed to be used better as part of another Web API or MVC project.
#### Metadata
The API offers command metadata for each command that can be reached.
The metadata is about:
* Number of actions available for a given command.
* Command overview (inherited from the *command* definition).
* Command name (inherited from the *command* definition).
* For each action it provides the following information:
* Action name
* Return type
* Parameter types## Basic Usage
To register the API as part of another application, just do:
```csharp
NetConsole.WebApi.WebApiConfig.Register(config); // HttpConfiguration config
```
Usually in Global.asax's Application_Start method or in WebApiConfig's Register method.#### API Routes
Once the API is running on a server the following urls will accessible from clients:
* *api/commands* `// Return an array of commands object with all their public properties`
* *api/commands/meta* `// Return an array of command metadata`
* *api/commands/{commandName}* `// Return a single command whose name is commandName`
* *api/commands/{commandName}/meta* `// Return command metadata for the command whose name is commandName`
* *api/commands/perform* `// Read the message body and perform the operation stated within.`## Manual Installation
Install the latest version from [NuGet](https://www.nuget.org/packages/NetConsole.WebApi/).## Contributing
In lieu of a formal style guide, please take care to follow the existing code style. Add unit tests for any new or changed functionality. Use FAKE and paket to handle automation and dependencies management.## Release History
Checks [Release Notes](https://github.com/renehernandez/NetConsole.WebApi/blob/master/RELEASE_NOTES.md) to see the changes history.