<commit_before># weightManagement
To Store and retrieve the human body weight


Two methods are available,

1) GET Method,
URL: 
   http://localhost/users/{userId}/weights

Summary: 
    Weights

Description: 
	To retrive the weight(s) information. Since the weight can be collected from the machine(ble connection) and can send batch of weights too, So this api accept array of weights.

Parameters:
	Name: 	userId	
	Located:  	path	
	Description: user unique id
	Required: 	Yes	
	Type: 		string

	Name: 		startDate
	Located: 	query	
	Description: Strating date user want to retrive the weight information.
	Required: 	No	
	Type: 		string (date)

	Name: 		endDate
	Located: 	query	
	Description: Ending date user want to retrive the weight information.
	Required: 	No	
	Type: 		string (date)

Response: <commit_msg>Added the readMe File<commit_after># weightManagement
To Store and retrieve the human body weight


# Two methods are available,

## GET Method,
URL: 
-  http://localhost/users/{userId}/weights

Summary: 
-   Weights

Description: 
-   To retrive the weight(s) information. By Default it will give last 10 days of data. (Which is configurable).

Parameters:

	Name: 	userId	
	Located:  	path	
	Description: user unique id
	Required: 	Yes	
	Type: 		string

	Name: 		startDate
	Located: 	query	
	Description: Strating date user want to retrive the weight information.
	Required: 	No	
	Type: 		string (date)

	Name: 		endDate
	Located: 	query	
	Description: Ending date user want to retrive the weight information.
	Required: 	No	
	Type: 		string (date)

Response: 
```json
{
	"data": [{
		"weight": "10.2",
		"date": "2016-12-31T10:10:10Z"
	}, {
		"weight": "22.2",
		"date": "2016-12-30T10:10:10Z"
	}, {
		"weight": "10.2",
		"date": "2016-12-29T10:10:10Z"
	}],
	"aggregation": {
		"minWeight": 12.3,
		"maxWeight": 24.6,
		"averageWeight": 17,
		"changeInWeight": 12.0,
		"dateofMaxWeight": "2016-12-30T10:10:10Z",
		"dateofMinweight": "2016-12-31T10:10:10Z",
		"count": 12
	}
}
```

## POST Method,
URL: 
-   http://localhost/users/{userId}/weights

Summary: 
-   Add Weights

Description: 
-   To store the weight(s) information. Since the weight can be collected from the machine(ble connection) and can send batch of weights too, So this api accept array of weights.

Parameters:

	Name: 	userId	
	Located:  	path	
	Description: user unique id
	Required: 	Yes	
	Type: 		string
	
Request: 
~~~json
[{
	"weight": "10.2",
	"date": "2016-12-31T10:10:10Z"
}, {
	"weight": "22.2",
	"date": "2016-12-30T10:10:10Z"
}, {
	"weight": "10.2",
	"date": "2016-12-29T10:10:10Z"
}]
~~~

Response: 
- Http Response code: 201

{'fraction_non_alphanumeric': 0.1202435312024353, 'fraction_numerical': 0.05669710806697108, 'mean_word_length': 3.5961538461538463, 'pattern_counts': {'":': 21, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '436817', 'n_tokens_mistral': 1083, 'n_tokens_neox': 960, 'n_words': 295}