Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oracle-samples/content-management-swift
Swift package to make it easier to use content (digital assets, structured content) from Oracle Content Management
https://github.com/oracle-samples/content-management-swift
cms headless-cms oracle-cloud oracle-content-management sdk sdk-swift swift
Last synced: 3 months ago
JSON representation
Swift package to make it easier to use content (digital assets, structured content) from Oracle Content Management
- Host: GitHub
- URL: https://github.com/oracle-samples/content-management-swift
- Owner: oracle-samples
- License: upl-1.0
- Created: 2023-04-05T17:33:03.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-24T10:16:45.000Z (over 1 year ago)
- Last Synced: 2023-08-24T12:01:44.285Z (over 1 year ago)
- Topics: cms, headless-cms, oracle-cloud, oracle-content-management, sdk, sdk-swift, swift
- Language: Swift
- Homepage: https://docs.oracle.com/en/cloud/paas/content-cloud/headless-cms.html
- Size: 412 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Security: SECURITY.md
Awesome Lists containing this project
README
# About Oracle Content Management - Content SDK (Swift)
The Content SDK for Oracle Content Management is a swift package that interacts with the Content REST APIs. This read-only SDK retrieves structured content, digital assets and taxonomies that are managed in Oracle Content Management.
## Installation
You can add the Content SDK to an Xcode project by adding it as a package dependency.1. From the **File** menu, select **Add Packages...**
2. Enter "https://github.com/oracle-samples/content-management-swift" into the package repository URL text field
3. Depending on how your project is structured:
- If you have a single application target that needs access to the library, then add
**OracleContentCore** and **OracleContentDelivery** directly to your application.
- If you want to use this library from multiple Xcode targets, or mix Xcode targets and SPM
targets, you must create a shared framework that depends on **OracleContentCore** and
**OracleContentManagement** and then depend on that framework in all of your targets.
- Do not include **OracleContentTest** in your application targets. Only include
**OracleContentTest** in testing targets.
## Documentation- [Developing for Oracle Content Management](https://docs.oracle.com/en/cloud/paas/content-cloud/developer/content-sdk.html)
- [Swift package](https://docs.oracle.com/en/cloud/paas/content-cloud/content-sdk-swift/delivery/)## Examples
In addition to these examples please see this package's [Examples](./Examples) directory.
### Generating a list of assets:
First create the service, specifying a URL that points to your Oracle Content Management server and providing a channel token to which assets have been published.
```swift
let service = DeliveryAPI.listAssets()
.overrideURL(url, headers: [])
.channelToken(channelToken)
```
You may then submit the request using one of the available invocation verbs.For an async/await operation, you may submit the request as follows. Note that "result" will be of type `Assets` (plural):
```swift
let result: Assets = try await service.fetchNextAsync()
```### Reading information about a specific asset:
Create the service:
```swift
let service = DeliveryAPI.readAsset()
.overrideURL(url, headers: [])
.channelToken(channelToken)
```Submit the request using one of the available invocation verbs.
For an async/await operation, you may submit the request as follows. Note that "result" will be of type `Asset` (singular):
```swift
let result: Asset = try await service.fetchAsync()
```More detailed examples illustrating the use of Onboarding are available in the Oracle Content Delivery documentation distributed with this package. Additionally, many different examples are available in the unit tests associated with each library.
## Contributing
This project welcomes contributions from the community. Before submitting a pull
request, please [review our contribution guide](./CONTRIBUTING.md).## Security
Please consult the [security guide](./SECURITY.md) for our responsible security
vulnerability disclosure process.## License
Copyright (c) 2023, Oracle and/or its affiliates.
Released under the Universal Permissive License v1.0 as shown at
.