{"id":89488,"date":"2019-03-18T10:29:16","date_gmt":"2019-03-18T10:29:16","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/lnp-api-client\/"},"modified":"2019-03-18T10:45:12","modified_gmt":"2019-03-18T10:45:12","slug":"lnp-api-client","status":"publish","type":"plugin","link":"https:\/\/hat.wordpress.org\/plugins\/lnp-api-client\/","author":15224027,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","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":"De Lnp API Client vormt een interface naar de Lnp database API die makkelijk in een WordPress site gebruikt kan worden, bijvoorbeeld m.b.v. een template.","assets_banners_color":"","last_updated":"2019-03-18 10:45:12","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":0,"downloads":1094,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.3.1"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1556,466,46106],"plugin_category":[],"plugin_contributors":[127741],"plugin_business_model":[],"class_list":["post-89488","plugin","type-plugin","status-publish","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\/lnp-api-client.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>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:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/89488","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=89488"}],"author":[{"embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/fundamentallmedia"}],"wp:attachment":[{"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=89488"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=89488"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=89488"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=89488"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=89488"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=89488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}