2017 © Pedro Peláez
 

library confluence-rest-client

Library to interact with the Confluence REST API

image

kvitli/confluence-rest-client

Library to interact with the Confluence REST API

  • Tuesday, August 1, 2017
  • by matslundberg
  • Repository
  • 1 Watchers
  • 1 Stars
  • 47 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

confluence-rest-client

Library to interact with the Confluence REST API, (*1)

Usage

Install using Composer:, (*2)

composer require kvitli/confluence-rest-api

Sample code:, (*3)

# Creating Confluence connection with parameters loaded from .env file
$cf = new Confluence();

# Get page id by space SPC and My sample page
$cf->get_page_id_by_title('SPC', 'My sample page');

# Update/create page My sample page in space SPC.
# $page_content must be valid XHTML
# $parent_page_id must be a page id
$cf->update_or_create_page('SPC', 'My sample page', $page_content, $parent_page_id);

$ Upload an attachment to a page
$cf->upload_attachment('/path/to/file', $page_id);

# Create a JIRA Link
$link = new Kvitli\Link('JIRA', $jira_key, $jira_key);

# Create an Info macro
$info = new Kvitli\Macro('info');

# Add a parameter
$info->add_parameter('atlassian-macro-output-type', 'INLINE');
# Add JIRA link to Macro as body
$info->set_body('

My JIRA LINK: '.$link->get_storage_format().', (*4)

'); # Create an Excerpt macro $excerpt = new Kvitli\Macro('excerpt'); # Added Info macro to Excerpt macro $excerpt->set_body($info->get_storage_format());

Setup development environment

git clone $repository
composer install

Run tests, (*5)

php tests/tests.php

Generate phpdoc, (*6)

php vendor/phpdocumentor/phpdocumentor/bin/phpdoc -d ./src -t ./docs/

The Versions

01/08 2017

dev-master

9999999-dev

Library to interact with the Confluence REST API

  Sources   Download

MIT

The Requires

 

The Development Requires

19/11 2016

0.0.1

0.0.1.0

Library to interact with the Confluence REST API

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0