brcontent 0.0.6 copy "brcontent: ^0.0.6" to clipboard
brcontent: ^0.0.6 copied to clipboard

Bloomreach Content - Page Delivery API Client

BR Content - Page API Client #

This is the Bloomreach Content - Page Delivery API client which can make a flutter app interact with the Page Delivery API

This Dart package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
  • Build package: org.openapitools.codegen.languages.DartClientCodegen

Requirements #

Dart 2.0 or later

Installation & Usage #

Github #

If this Dart package is published to Github, add the following dependency to your pubspec.yaml

dependencies:
  brcontent:
    git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git

Local #

To use the package in your local drive, add the following dependency to your pubspec.yaml

dependencies:
  brcontent:
    path: /path/to/pageapi

Tests #

TODO

Getting Started #

Please follow the installation procedure and then run the following:

import 'package:brcontent/api.dart';

final instance =
PageApi(ApiClient(basePath: 'https://sandbox-sales02.bloomreach.io'));

final path = path_example; // String | 
final channelId = channelId_example; // String | 

try {
    final Page page = await instance.getPage(channelId, path);
    print(page);

    Container container = page.getComponentByPath('container') ;

    var components = container.getComponents(page);

    components.forEach((containerItem) {
      print(containerItem!.name);
      if (containerItem.hasContent()) {
        print(containerItem.getContent(page)?.data);
        print('-----------');
      }
    });
} catch (e) {
    print('Exception when calling PageApi->getPage: $e\n');
}

Documentation for API Endpoints #

All URIs are relative to https://kenan.bloomreach.io

Class Method HTTP request Description
PageApi getPage GET /delivery/site/v1/channels/{channel_id}/pages/{path} Get Page by path

Documentation For Models #

Documentation For Authorization #

All endpoints do not require authorization.

Author #

kenan.salic@bloomreach.com

2
likes
0
pub points
39%
popularity

Publisher

verified publisherpub.bloomreach.works

Bloomreach Content - Page Delivery API Client

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, http, intl, meta

More

Packages that depend on brcontent