Powered By Blogger
Showing posts with label API. Show all posts
Showing posts with label API. Show all posts

Thursday, September 13, 2018

call api in same wordpress instance OR WordPress REST API Calls Internally

REF : https://wpscholar.com/blog/internal-wp-rest-api-calls/



$api_data = array(
'post' => $post
);

$request = new WP_REST_Request( 'POST', '/gic/v1/subscriber' );
$request->set_query_params( $api_data );
$response = rest_do_request( $request );
$server = rest_get_server();
$data = $server->response_to_data( $response, false );
$json = wp_json_encode( $data );

Monday, October 23, 2017

nearby city OR location information OR near by area


https://stackoverflow.com/questions/5232242/google-api-get-nearest-locations

http://www.geonames.org/export/codes.html


http://gd.geobytes.com/GetNearbyCities?key=e1dbb684d8489f3b13be0faff9a91522&radius=15.53425&Latitude=25.7616798&Longitude=-80.1917902&limit=999



using query

https://vijaylathiya.wordpress.com/2016/05/01/get-records-between-lat-long-radius-in-wordpress-php-mysql/

Friday, December 2, 2016

WP REST API with OAuth


http://v2.wp-api.org/guide/authentication/


test REF : https://github.com/WP-API/example-client


Local REF:
http://localhost/rest-api-client/


Troubleshooting:

https://github.com/WP-API/example-client/issues/5