JSPM

contentful-roku

1.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 106
  • Score
    100M100P100Q57929F
  • License MIT

BrightScript Contentful SDK

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (contentful-roku) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Contentful Roku

    BrightScript Contentful SDK

    Installation

    npm i contentful-roku

    Usage

    ' @import /components/libs/ContentfulSDK.brs from contentful-roku
    
    sub init()
      m._contentful = ContentfulSDK({
        accessToken: "<My_Contentful_Access_Token>",
        baseUrl: "http://cdn.contentful.com", ' default value
        environment: "master", ' default value
        space: "<My_Contentful_Space_ID>",
      })
    
      m._contentful.getSpace().then(onDataReceived)
    end sub
    
    sub onDataReceived(contentfulSpaceData as Object)
      print contentfulSpaceData
    end sub