Skip to content

Commit b715dee

Browse files
committed
version
1 parent f481618 commit b715dee

10 files changed

+75
-19
lines changed

index.js

-3
This file was deleted.

lib/API.js

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* Main API class
3+
*
4+
* @since 1.0.0
5+
* @version 1.0.0
6+
*/
7+
18
'use strict';
29

310
const
@@ -8,7 +15,7 @@ const
815
/**
916
* LifterLMS REST API Wrapper
1017
*
11-
* @since [version]
18+
* @since 1.0.0
1219
*
1320
* @param obj options {
1421
* An object of configuration options
@@ -57,7 +64,7 @@ function API( options ) {
5764
/**
5865
* Registers all LifterLMS core Request methods with the main api instance so they can be accessed without the vendor prefix.
5966
*
60-
* @since [version]
67+
* @since 1.0.0
6168
*
6269
* @return void
6370
*/
@@ -77,7 +84,7 @@ API.prototype._unprefixCore = function() {
7784
/**
7885
* Set options.
7986
*
80-
* @since [version]
87+
* @since 1.0.0
8188
*
8289
* @param obj options object. See definition for `api()` for more details.
8390
* @return void
@@ -103,7 +110,7 @@ API.prototype._setOptions = function( options ) {
103110
/**
104111
* Retrieve a class option.
105112
*
106-
* @since [version]
113+
* @since 1.0.0
107114
*
108115
* @param string key Option name.
109116
* @return mixed
@@ -115,7 +122,7 @@ API.prototype.getOption = function( key ) {
115122
/**
116123
* Register a custom namespace that can be utilized for accessing WP Rest API endpoints for 3rd party vendors.
117124
*
118-
* @since [version]
125+
* @since 1.0.0
119126
*
120127
* @see {Reference}
121128
* @link {URL}

lib/Request.js

+16-9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* Main Request class
3+
*
4+
* @since 1.0.0
5+
* @version 1.0.0
6+
*/
7+
18
'use strict';
29

310
const
@@ -11,7 +18,7 @@ const
1118
/**
1219
* Constructor
1320
*
14-
* @since [version]
21+
* @since 1.0.0
1522
*
1623
* @param API api API Instance.
1724
* @param string namespace Vendor string (eg "llms/v1").
@@ -26,7 +33,7 @@ function Request( api, namespace ) {
2633
/**
2734
* Build a full URL for a request.
2835
*
29-
* @since [version]
36+
* @since 1.0.0
3037
*
3138
* @param string Endpoint path.
3239
* @return string
@@ -58,7 +65,7 @@ Request.prototype._getURL = function( endpoint ) {
5865
/**
5966
* Build arguments to pass with a request
6067
*
61-
* @since [version]
68+
* @since 1.0.0
6269
*
6370
* @param string method HTTP method.
6471
* @param string endpoint Request endpoint.
@@ -103,7 +110,7 @@ Request.prototype._getRequestArgs = function( method, endpoint, data ) {
103110
/**
104111
* Preform requests.
105112
*
106-
* @since [version]
113+
* @since 1.0.0
107114
*
108115
* @see {Reference}
109116
* @link {URL}
@@ -136,7 +143,7 @@ Request.prototype._request = function( method, endpoint, data_or_callback, callb
136143
/**
137144
* Preform a GET request.
138145
*
139-
* @since [version]
146+
* @since 1.0.0
140147
*
141148
* @param string endpoint Request endpoint.
142149
* @param obj|function|null data_or_callback Data (to be converted to query string parameters) or callback function.
@@ -150,7 +157,7 @@ Request.prototype.get = function( endpoint, data_or_callback, callback ) {
150157
/**
151158
* Preform a POST request.
152159
*
153-
* @since [version]
160+
* @since 1.0.0
154161
*
155162
* @param string endpoint Request endpoint.
156163
* @param obj|function|null data Request data.
@@ -164,7 +171,7 @@ Request.prototype.post = function( endpoint, data, callback ) {
164171
/**
165172
* Preform a PUT request.
166173
*
167-
* @since [version]
174+
* @since 1.0.0
168175
*
169176
* @param string endpoint Request endpoint.
170177
* @param obj|function|null data Request data.
@@ -178,7 +185,7 @@ Request.prototype.put = function( endpoint, data, callback ) {
178185
/**
179186
* Preform a Delete request.
180187
*
181-
* @since [version]
188+
* @since 1.0.0
182189
*
183190
* @param string endpoint Request endpoint.
184191
* @param obj|function|null data_or_callback Request data or callback function.
@@ -192,7 +199,7 @@ Request.prototype.delete = function( endpoint, data_or_callback, callback ) {
192199
/**
193200
* Preform an options request.
194201
*
195-
* @since [version]
202+
* @since 1.0.0
196203
*
197204
* @param string endpoint Request endpoint.
198205
* @param Function callback Callback function.

lib/utils.js

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* Utility functiosn
3+
*
4+
* @since 1.0.0
5+
* @version 1.0.0
6+
*/
7+
18
'use strict';
29

310
/**

lifterlms-api.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* LifterLMS API
3+
*
4+
* @since 1.0.0
5+
* @version [version]
6+
*/
7+
8+
'use strict';
9+
10+
module.exports = require( './lib/API' );

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "llms-api-node",
3-
"version": "0.0.1",
3+
"version": "1.0.0",
44
"description": "Node.js wrapper for the LifterLMS REST API",
55
"main": "index.js",
66
"scripts": {

tests/helpers.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* Test Helpers
3+
*
4+
* @since 1.0.0
5+
* @version 1.0.0
6+
*/
7+
18
'use strict';
29

310
const
@@ -6,7 +13,7 @@ const
613
/**
714
* Retrieve instance of LifterLMS API
815
*
9-
* @since [version]
16+
* @since 1.0.0
1017
*
1118
* @param object options options to assign to the API instance.
1219
* @param bool merge if true, merges options with default mock options.

tests/test-API.js

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* Test API Class
3+
*
4+
* @since 1.0.0
5+
* @version 1.0.0
6+
*/
7+
18
'use strict';
29

310
const

tests/test-Request.js

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* Test Request Class
3+
*
4+
* @since 1.0.0
5+
* @version 1.0.0
6+
*/
7+
18
'use strict';
29

310
const

tests/test-utilities.js

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* Test Utility Functions
3+
*
4+
* @since 1.0.0
5+
* @version 1.0.0
6+
*/
7+
18
'use strict';
29

310
const

0 commit comments

Comments
 (0)