Skip to content

Conversation

@jonathannorris
Copy link
Member

Expose DevCycleClient from DevCycleProvider

Addresses the need to access proprietary DevCycle features while using the OpenFeature API, as outlined in #262.

Based on the work from PR #263 by @nnoel-grubhub

Changes:

  • ✨ New public property: devcycleClient provides access to the underlying DevCycleClient instance
  • 📝 Consistent naming: Updated to camelCase convention (devcycleClient, _devcycleClient)
  • 🧪 Enhanced testing: Added comprehensive tests for property access and error cases

Usage:

val provider = DevCycleProvider(sdkKey, context)
OpenFeatureAPI.setProviderAndWait(provider)

// Access proprietary features like allFeatures() for analytics
val allFeatures = provider.devcycleClient.allFeatures()

Closes #262

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR exposes the underlying DevCycleClient instance through a public property on DevCycleProvider, allowing access to proprietary DevCycle features while using the OpenFeature API.

  • Added public devcycleClient property with error handling for uninitialized state
  • Renamed internal field from devCycleClient to _devcycleClient for consistency
  • Enhanced test coverage for property access and error scenarios

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
DevCycleProvider.kt Added public devcycleClient property and renamed private field to _devcycleClient
DevCycleProviderTest.kt Added tests for property access when client is initialized and uninitialized

@jonathannorris jonathannorris merged commit ae6fa90 into main Aug 6, 2025
5 checks passed
@jonathannorris jonathannorris deleted the feat/expose-devcycle-client-from-provider branch August 6, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

OpenFeatureAPI usage precludes use of proprietary features

5 participants