{"id":15522454,"url":"https://github.com/imranhsayed/rest-api-endpoints","last_synced_at":"2025-04-23T03:51:23.947Z","repository":{"id":47355167,"uuid":"187181875","full_name":"imranhsayed/rest-api-endpoints","owner":"imranhsayed","description":":ear_of_rice: WordPress REST API endpoints","archived":false,"fork":false,"pushed_at":"2020-04-22T19:28:11.000Z","size":1278,"stargazers_count":41,"open_issues_count":0,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-17T19:17:37.420Z","etag":null,"topics":["capabilities","create-post","custom-endpoints","endpoint","endpoints","example","post","rest-api","rest-api-example","user","user-auth","user-authentication","user-roles","wordpress","wordpress-api","wordpress-blog","wordpress-development","wordpress-plugin","wordpress-posts","wordpress-rest-api"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imranhsayed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-17T08:52:50.000Z","updated_at":"2024-06-01T16:51:24.000Z","dependencies_parsed_at":"2022-08-21T13:10:38.219Z","dependency_job_id":null,"html_url":"https://github.com/imranhsayed/rest-api-endpoints","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranhsayed%2Frest-api-endpoints","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranhsayed%2Frest-api-endpoints/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranhsayed%2Frest-api-endpoints/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranhsayed%2Frest-api-endpoints/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imranhsayed","download_url":"https://codeload.github.com/imranhsayed/rest-api-endpoints/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366685,"owners_count":21418768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capabilities","create-post","custom-endpoints","endpoint","endpoints","example","post","rest-api","rest-api-example","user","user-auth","user-authentication","user-roles","wordpress","wordpress-api","wordpress-blog","wordpress-development","wordpress-plugin","wordpress-posts","wordpress-rest-api"],"created_at":"2024-10-02T10:41:11.466Z","updated_at":"2025-04-23T03:51:23.924Z","avatar_url":"https://github.com/imranhsayed.png","language":"PHP","readme":"# REST API ENDPOINT\n\n\u003e This plugin provides you different endpoints using WordPress REST API.\n\n* :bust_in_silhouette: Login End Point\n* :page_with_curl: Create Post End Point\n\n## Login Endpoint Demo :video_camera:\n\nWhen we access the end point on URI: `http://your-domain/wp-json/wp/v2/rae/user/login`,\nand we pass our username and password in the body using postman, we get the following with a status code:\n* User Object on success\n* Error when fields are empty or incorrect credentials\n* Any other error.\n\n![](login-endpoint-demo.gif)\n\n## Create a new post Endpoint Demo :video_camera:\n\nWhen we access the end point on URI: `http://your-domain/wp-json/wp/v2/rae/post/create`,\nand we pass our 'user_id', 'title' and 'content' in the body using postman, we get the following with a status code:\n* New post id if the post is created.\n* Error when fields are empty or if the user with the given id does not have capability to publish posts.\n* Any other error.\n\n![](create-new-post.gif)\n\n## Getting Started :clipboard:\n\nThese instructions will get you a copy of the project up and running on your local machine for development purposes.\n\n## Prerequisites :door:\n\nYou need to have any WordPress theme activated on your WordPress project, which has REST API enabled.\n\n## Installation :wrench:\n\n1. Clone the plugin directory in the `/wp-content/plugins/` directory, or install a zipped directory of this plugin through the WordPress plugins screen directly.\n2. Activate the plugin through the 'Plugins' screen in WordPress\n\n## Use :ski:\n\nThere are different end points that are available. Some are public while others are protected.\n\n* :bust_in_silhouette: Login End Point `http://your-domain/wp-json/wp/v2/rae/user/login`\n\n\u003e Params to be sent in the body\n`username(String)` and `password(String)`\nReturn Value: `User Object or Error (Object)`\n\n* :page_with_curl: Create Post End Point `http://your-domain/wp-json/wp/v2/rae/post/create`\n\n\u003e Params to be sent in the body\n`user_id(Int)`, `title(String)` and `content(String)`\nReturn Value: `Object with post ID and status or Error (Object)`\n\n\n## Features\n* Adds option to add social links in customizer\n* Registers two custom menus for header ( menu location = rwt-menu-header ) and for footer ( menu location = rwt-menu-footer )\n* Registers the following sidebars\n1. RWT Footer #1 with sidebar id 'rwt-sidebar-1'\n2. RWT Footer #2 with sidebar id 'rwt-sidebar-2'\n\n* Registers custom end points\n\n## Available Endpoints:\n\n### Get single post ( GET request )\n* `http://example.com/wp-json/rae/v1/post?post_id=1`\n\n### Get posts by page no: ( GET Request )\n* `http://example.com/wp-json/rae/v1/posts?page_no=1`\n\n### Get header and footer date: ( GET Request )\n* Get the header data ( site title, site description , site logo URL, menu items ) and footer data ( footer menu items, social icons )\n* `http://example.com/wp-json/rae/v1/header-footer?header_location_id=primary\u0026footer_location_id=secondary`\n\n### Create new post: ( POST Request )\n* http://example.com/wp-json/rae/v1/post/create\n\n## Contributing :busts_in_silhouette:\n\nPlease read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Versioning\n\nI use [Git](https://github.com/) for versioning. \n\n## Author :pencil:\n\n* **[Imran Sayed](https://codeytek.com)**\n\n## License :page_facing_up:\n\n[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org)\n\n- **[MIT license](http://opensource.org/licenses/mit-license.php)**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimranhsayed%2Frest-api-endpoints","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimranhsayed%2Frest-api-endpoints","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimranhsayed%2Frest-api-endpoints/lists"}