{"id":36151,"date":"2015-05-06T09:02:17","date_gmt":"2015-05-06T09:02:17","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/niki-api-client\/"},"modified":"2018-05-04T11:30:53","modified_gmt":"2018-05-04T11:30:53","slug":"niki-api-client","status":"closed","type":"plugin","link":"https:\/\/cn.wordpress.org\/plugins\/niki-api-client\/","author":14391403,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.3.1","stable_tag":"0.3.1","tested":"4.9.29","requires":"3.0.1","requires_php":"","requires_plugins":"","header_name":"Niki API Client","header_author":"Fundament All Media","header_description":"","assets_banners_color":"486785","last_updated":"2018-05-04 11:30:53","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/fundament.nl\/","header_plugin_uri":"http:\/\/niki.nl","header_author_uri":"http:\/\/www.fundament.nl","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1356,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":{"icon-128x128.jpg":{"filename":"icon-128x128.jpg","revision":"1844202","resolution":"128x128","location":"assets"},"icon-256x256.jpg":{"filename":"icon-256x256.jpg","revision":"1844202","resolution":"256x256","location":"assets"}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":"1844190","resolution":"1544x500","location":"assets"},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":"1844190","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1","0.2","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5","0.3","0.3.1"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[1556,466,46106],"plugin_category":[],"plugin_contributors":[127741],"plugin_business_model":[],"class_list":["post-36151","plugin","type-plugin","status-closed","hentry","plugin_tags-api","plugin_tags-client","plugin_tags-niki-rest-api","plugin_contributors-fundamentallmedia","plugin_committers-fundamentallmedia"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/niki-api-client_486785.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>The Niki API Client is a Wordpress implementation of the Niki.nl REST API. It yields the\nfollowing functionality:<\/p>\n\n<ul>\n<li>authorisation: using username and password, acquire an oauth (version 1.0) token to access the Niki API<\/li>\n<li>project selection: in a list of all projects in your account, select the relevant project(s) to use in the website<\/li>\n<li>resource implementations: Implementation of all resources of the <a href=\"https:\/\/api.niki.nl\/apidocs\">Niki REST API<\/a> except for the 'search' resources.<\/li>\n<\/ul>\n\n<h4>Example implementation<\/h4>\n\n<p>In the plugin directory, a folder named 'examples' is included. This folder contains 3 items:\n # \/classes: example view classes for housetypes, housetype-listings, and interest forms\n # \/theme: contains an example wordpress-theme, this theme can be installed (copied) in your theme folder\n # niki-functions.php: file providing methods for displaying various Niki data<\/p>\n\n<p>Of course, these are example implementations, not ment for direct production use. They will point you in the right direction while\n implementing your own Niki-data filled website.<\/p>\n\n<!--section=installation-->\n<h4>From your WordPress dashboard<\/h4>\n\n<ol>\n<li>Visit 'Plugins &gt; Add New'<\/li>\n<li>Search for 'Niki API client'<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Under <code>Niki server<\/code>, enter <code>Niki OAuth URL<\/code> : <code>https:\/\/auth.niki.nl<\/code><\/li>\n<li>Under <code>Niki server<\/code>, enter <code>Niki API URL<\/code> : <code>https:\/\/api.niki.nl<\/code><\/li>\n<li>Press <code>Wijzigingen opslaan<\/code><\/li>\n<li>Click <code>Vraag Niki API Token aan<\/code> and follow instructions.<\/li>\n<li>When the token is retrieved, under <code>Niki projecten<\/code> check the relevant projects and click <code>Wijzigingen opslaan<\/code><\/li>\n<li>You are now ready to use the Niki data in your Wordpress site.<\/li>\n<\/ol>\n\n<h4>From WordPress.org<\/h4>\n\n<ol>\n<li>Download Niki API client<\/li>\n<li>Upload the plugin folder to the <code>\/wp-content\/plugins\/<\/code> directory using your favorite method (ftp, sftp, scp, etc...)<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Under <code>Niki server<\/code>, enter <code>Niki OAuth URL<\/code> : <code>https:\/\/auth.niki.nl<\/code><\/li>\n<li>Under <code>Niki server<\/code>, enter <code>Niki API URL<\/code> : <code>https:\/\/api.niki.nl<\/code><\/li>\n<li>Press <code>Wijzigingen opslaan<\/code><\/li>\n<li>Click <code>Vraag Niki API Token aan<\/code> and follow instructions.<\/li>\n<li>When the token is retrieved, under <code>Niki projecten<\/code> check the relevant projects and click <code>Wijzigingen opslaan<\/code><\/li>\n<li>You are now ready to use the Niki data in your Wordpress site.    <\/li>\n<\/ol>\n\n<h4>Installing the example theme<\/h4>\n\n<ol>\n<li>Using FTP, copy the folder \/examples\/theme\/niki-template to your themes folder<\/li>\n<li>Go to your admin dashboard http:\/\/www.yoursite.nl\/wp-admin<\/li>\n<li>Go to settings-&gt;permalinks, activate the \"Post name\" option and then save the changes<\/li>\n<li>Under display-&gt;theme's, click 'activate' on item 'Niki Template'<\/li>\n<li>Now go visit your site http:\/\/www.yoursite.nl\/niki\/aanbod and http:\/\/www.yoursite.nl\/niki\/interesse<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Installation Instructions<\/dt>\n<dd><h4>From your WordPress dashboard<\/h4>\n\n<ol>\n<li>Visit 'Plugins &gt; Add New'<\/li>\n<li>Search for 'Niki API client'<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Under <code>Niki server<\/code>, enter <code>Niki OAuth URL<\/code> : <code>https:\/\/auth.niki.nl<\/code><\/li>\n<li>Under <code>Niki server<\/code>, enter <code>Niki API URL<\/code> : <code>https:\/\/api.niki.nl<\/code><\/li>\n<li>Press <code>Wijzigingen opslaan<\/code><\/li>\n<li>Click <code>Vraag Niki API Token aan<\/code> and follow instructions.<\/li>\n<li>When the token is retrieved, under <code>Niki projecten<\/code> check the relevant projects and click <code>Wijzigingen opslaan<\/code><\/li>\n<li>You are now ready to use the Niki data in your Wordpress site.<\/li>\n<\/ol>\n\n<h4>From WordPress.org<\/h4>\n\n<ol>\n<li>Download Niki API client<\/li>\n<li>Upload the plugin folder to the <code>\/wp-content\/plugins\/<\/code> directory using your favorite method (ftp, sftp, scp, etc...)<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Under <code>Niki server<\/code>, enter <code>Niki OAuth URL<\/code> : <code>https:\/\/auth.niki.nl<\/code><\/li>\n<li>Under <code>Niki server<\/code>, enter <code>Niki API URL<\/code> : <code>https:\/\/api.niki.nl<\/code><\/li>\n<li>Press <code>Wijzigingen opslaan<\/code><\/li>\n<li>Click <code>Vraag Niki API Token aan<\/code> and follow instructions.<\/li>\n<li>When the token is retrieved, under <code>Niki projecten<\/code> check the relevant projects and click <code>Wijzigingen opslaan<\/code><\/li>\n<li>You are now ready to use the Niki data in your Wordpress site.    <\/li>\n<\/ol>\n\n<h4>Installing the example theme<\/h4>\n\n<ol>\n<li>Using FTP, copy the folder \/examples\/theme\/niki-template to your themes folder<\/li>\n<li>Go to your admin dashboard http:\/\/www.yoursite.nl\/wp-admin<\/li>\n<li>Go to settings-&gt;permalinks, activate the \"Post name\" option and then save the changes<\/li>\n<li>Under display-&gt;theme's, click 'activate' on item 'Niki Template'<\/li>\n<li>Now go visit your site http:\/\/www.yoursite.nl\/niki\/aanbod and http:\/\/www.yoursite.nl\/niki\/interesse<\/li>\n<\/ol><\/dd>\n<dt>How do I show information of a specific housetype in my site?<\/dt>\n<dd><p>Include the <code>niki-functions.php<\/code> in your page template and call the specific housetype information\nby specifying project id and housetype id like so:<\/p>\n\n<pre><code>&lt;?\nrequire_once $niki-&gt;get_plugin_path() . \"examples\/niki-functions.php\";\nniki_show_woningtype('TBIGEN_79DBBC06-518B-4591-882E-EE63359CCBA8','TBIGEN_4D14999B-87DB-4874-ACB9-B3CBD87B2936');\n?&gt;\n<\/code><\/pre>\n\n<p>In this example, the first parameter is the Niki project id, and the second parameter is the Niki housetype id.<\/p><\/dd>\n<dt>How do I list the housetypes in my selected projects?<\/dt>\n<dd><p>Include the <code>niki-functions.php<\/code> in your page template and call the listing example function like so:<\/p>\n\n<pre><code>&lt;? \nrequire_once $niki-&gt;get_plugin_path() . \"examples\/niki-functions.php\";\nniki_show_aanbod(); \n?&gt;\n<\/code><\/pre>\n\n<p>This will generate a listing of all housetypes in the projects selected in the admin configuration.<\/p><\/dd>\n<dt>How do i render a default interest form?<\/dt>\n<dd><p>Include the <code>niki-functions.php<\/code> in your page template (if you dit not do already so), and show the form:<\/p>\n\n<pre><code>&lt;? \nrequire_once $niki-&gt;get_plugin_path() . \"examples\/niki-functions.php\";\nniki_show_interesse();  \n?&gt;\n<\/code><\/pre><\/dd>\n<dt>How do I make a generic Niki API request<\/dt>\n<dd><p>Given any Niki API resource, you can access the Niki API by the following code:<\/p>\n\n<pre><code>&lt;?\n\/\/ example project resource\n$resource = '\/projects\/34\/TBIGEN_79DBBC06-518B-4591-882E-EE63359CCBA8' ;\n$myProject = $niki-&gt;get_niki_resource($resource, array()); \/\/ empty parameter array, not needed here\n\/\/ display the contents of $myProject\nvar_dump($myProject);\n?&gt;\n<\/code><\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.3.1<\/h4>\n\n<p>Bugfix to make example template work with the rewrite rules<\/p>\n\n<h4>0.3<\/h4>\n\n<p>Name change of API to Het Nieuwbouw Platform API client<\/p>\n\n<h4>0.2.4<\/h4>\n\n<p>Fixed a missing error message after changes were made in the Oauth module of auth.niki.nl<\/p>\n\n<h4>0.2.3<\/h4>\n\n<p>Added Jurgen to contributors<\/p>\n\n<h4>0.2.2<\/h4>\n\n<p>Added extra div to detailpage for additional styling options.<\/p>\n\n<h4>0.2.1<\/h4>\n\n<p>Always initialize niki object in contructor for global accessing of plugin.<\/p>\n\n<h4>0.1<\/h4>\n\n<p>Initial Release<\/p>","raw_excerpt":"This Niki API Client is an interface to the Niki house-database API, for easy usage in Wordpress sites. For example using a template.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/36151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=36151"}],"author":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/hzegwaard"}],"wp:attachment":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=36151"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=36151"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=36151"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=36151"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=36151"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=36151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}