new WordpressService($q, $log, $http)
Service used for fetching data from Wordpress API
Parameters:
Name | Type | Description |
---|---|---|
$q |
$q | See https://code.angularjs.org/1.2.26/docs/api/ng/service/$q |
$log |
$log | See https://code.angularjs.org/1.2.26/docs/api/ng/service/$log |
$http |
$http | See https://code.angularjs.org/1.2.26/docs/api/ng/service/$http |
- Source:
Methods
getPostById(id, blogName) → {obj}
Get a single Wordpress blog post by blogname and blogpost id
Parameters:
Name | Type | Description |
---|---|---|
id |
String | Id of the blog post. |
blogName |
String | The Wordpress name. |
- Source:
Returns:
Blog post
- Type
- obj
getPosts(blogName) → {obj}
Get Wordpress blog posts by given blog-id
Parameters:
Name | Type | Description |
---|---|---|
blogName |
String | The Wordpress name. |
- Source:
Returns:
Blog posts
- Type
- obj