LogoLogo
  • Rad TV Creator and Streaming Docs
  • Getting Started - Creators, Studios, Publishers
    • Create Your Rad TV Channel
    • Upload and Monetize Videos
    • Sell Individual Videos
    • Sell Subscription Video
    • Create Content Playlists
    • Create a FAST Channel
    • Publish RSS From Outside Server
    • Get Verified
    • Get Approved for Subscription Payments
    • Pricing Onchain Art
    • Maximize Your Earnings
    • VR and Portrait Content FAQ
  • Getting Started - Subscribers, Viewers
    • Premium and Free On-Demand Video, and Free TV
    • Rad TV for Web
    • Rad TV for PS5 / PS VR2
      • Sideloading
      • DLNA/UPnP
      • RSS Feeds
      • Video Encoding
      • File Naming Conventions
      • Controls for VR Version
      • Changelog for VR Version
    • Rad TV for PS4 / PS VR
      • Sideloading
    • Rad TV for iOS / Apple TV
    • Rad TV for Android / Android TV / Chromecast
    • Rad TV for Meta Quest
      • Sideloading
    • Local Media Servers and DLNA/UPnP
    • Adding External RSS Feeds to Your Library
  • Getting Started - Developer API
    • Authentication
    • GraphQL Basics
    • Managing Content
    • Managing Playlists
    • Managing Channels
  • Premium Subscriptions
    • Unlock Rad TV Premium with a Stream Pass NFT
  • Earn Free Premium Benefits via Referrals
  • Rad TV Partnerships for Businesses
  • Rad TV Blockchain Integrations
  • Rad TV Technical Support
Powered by GitBook
On this page
  • Working with Content
  • Creating Content
  • Updating Content
  • Best Practices
  1. Getting Started - Developer API

Managing Content

PreviousGraphQL BasicsNextManaging Playlists

Last updated 4 months ago

Check out our custom Rad TV Developer API . (free or premium OpenAI account required)

Working with Content

The Rad TV Developer API provides robust capabilities for managing content within your channel. Using GraphQL mutations, you can create, update, and organize content programmatically.

Creating Content

To create content, use the createContent mutation. This operation requires a channel identifier and a ContentInput object to specify the content metadata.

GraphQL Mutation Example:

mutation {
  createContent(
    channel: "did:rad:channel/5678-wxyz",
    input: {
      metadata: {
        name: "Summer Adventure",
        summary: "A video capturing summer memories",
        keywords: ["summer", "adventure", "vacation"]
      }
    }
  ) {
    id
    metadata {
      name
      summary
    }
  }
} 

Expected Response:

{
  "data": {
    "createContent": {
      "id": "did:rad:content/abcd-1234",
      "metadata": {
        "name": "Summer Adventure",
        "summary": "A video capturing summer memories"
      }
    }
  }
}

Updating Content

To update existing content, use the updateContent mutation. Specify the content ID and the fields to be updated.

GraphQL Mutation Example:

mutation {
  updateContent(
    id: "did:rad:content/abcd-1234",
    input: {
      metadata: {
        name: "Summer Adventure - Updated",
        summary: "Updated summary for summer memories"
      }
    }
  ) {
    id
    metadata {
      name
      summary
    }
  }
}

Expected Response:

{
  "data": {
    "updateContent": {
      "id": "did:rad:content/abcd-1234",
      "metadata": {
        "name": "Summer Adventure - Updated",
        "summary": "Updated summary for summer memories"
      }
    }
  }
}

Best Practices

  • Validate Content Metadata: Ensure all required fields in the metadata are populated.

  • Handle Errors Gracefully: Implement error handling for cases like invalid input or insufficient permissions.

  • Organize Content: Use meaningful names and summaries for easier management and discoverability.

chatbot here