Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added sample for Forem (Independent Publisher) connector #55

Merged
merged 4 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions samples/forem/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Forem

## Summary

This sample shows how you can use the Forem (Independent Publisher) connector. In this case it shows the latest posts, posts about Azure and posts about .NET. In this example I used DevTo as the Forem instance. The sample also uses the Creator Kit - so make sure to install that before importing this sample!

![Example of the app.](assets/forem.png)

## Applies to

![Power Apps](https://img.shields.io/badge/Power%20Apps-Yes-green "Yes")
![Power Automate](https://img.shields.io/badge/Power%20Automate-No-red "No")
![Power BI](https://img.shields.io/badge/Power%20BI-No-red "No")
![Power Pages](https://img.shields.io/badge/Power%20Pages-No-red "No")
![Power Virtual Agents](https://img.shields.io/badge/Power%20Virtual%20Agents-No-red "No")
![Dataverse](https://img.shields.io/badge/Dataverse-No-red "No")
![AI Builder](https://img.shields.io/badge/AI%20Builder-No-red "No")
![Custom Connectors](https://img.shields.io/badge/Custom%20Connectors-No-red "No")
![Power Fx](https://img.shields.io/badge/Power%20Fx-No-red "No")

## Compatibility

![Premium License](https://img.shields.io/badge/Premium%20License-Required-green.svg "Premium license required")
![Experimental Features](https://img.shields.io/badge/Experimental%20Features-No-red.svg "Does not rely on experimental features")

## Contributors

* [Daniel Laskewitz](https://github.com/laskewitz)

## Version history

Version|Date|Comments
-------|----|--------
1.0|November 10, 2023|Initial release

## Prerequisites

* Install the [Creator Kit](https://learn.microsoft.com/power-platform/guidance/creator-kit/setup) before installing this solution
* When prompted to connect to the Forem (Independent Publisher) connector, use dev.to as hostname for [Dev.To](https://dev.to) and enter the API key (Which you can generate in the [extension](https://dev.to/settings/extensions) section in the settings on [Dev.To](https://dev.to)).

## Minimal path to awesome

### Using the solution zip

* [Download](./solution/forem.zip) the `.zip` from the `solution` folder
* Within **Power Apps Studio**, import the solution `.zip` file using **Solutions** > **Import Solution** and select the `.zip` file you just packed.
* Open the app in edit mode and make sure the data source **Forem (Independent Publisher)** is connected correctly.

### Using the source code

You can also use the [Power Apps CLI](https://docs.microsoft.com/powerapps/developer/data-platform/powerapps-cli) to pack the source code by following these steps:

* Clone the repository to a local drive
* Pack the source files back into a solution `.zip` file:

```bash
pac solution pack --zipfile pathtodestinationfile --folder pathtosourcefolder --processCanvasApps
```

Making sure to replace `pathtosourcefolder` to point to the path to this sample's `sourcecode` folder, and `pathtodestinationfile` to point to the path of this solution's `.zip` file (located under the `solution` folder)
* Within **Power Apps Studio**, import the solution `.zip` file using **Solutions** > **Import Solution** and select the `.zip` file you just packed.

## Help

We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.

If you encounter any issues while using this sample, you can [create a new issue](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=bug-report.yml&sample=forem&authors=@Laskewitz&title=forem%20-%20).

For questions regarding this sample, [create a new question](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=question.yml&sample=forem&authors=@Laskewitz&title=forem%20-%20).

Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=suggestion.yml&sample=forem&authors=@Laskewitz&title=forem%20-%20).

## Disclaimer

**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**

<img src="https://m365-visitor-stats.azurewebsites.net/powerplatform-samples/samples/forem" />
Binary file added samples/forem/assets/forem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 76 additions & 0 deletions samples/forem/assets/sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
[
{
"name": "pnp-powerplatform-samples-forem",
"source": "pnp",
"title": "Forem",
"shortDescription": "This sample shows how you can use the Forem (Independent Publisher) connector.",
"url": "https://github.com/pnp/powerplatform-samples/tree/main/samples/forem",
"downloadUrl": "https://pnp.github.io/download-partial/?url=https://github.com/pnp/powerplatform-samples/tree/main/samples/forem",
"longDescription": [
"This sample shows how you can use the Forem (Independent Publisher) connector. In this case it shows the latest posts, posts about Azure and posts about .NET. In this example I used DevTo as the Forem instance. The sample also uses the Creator Kit - so make sure to install that before importing this sample!"
],
"creationDateTime": "2023-11-10",
"updateDateTime": "2023-11-10",
"products": [
"Power Apps",
"Power Platform"
],
"tags": [
"forem",
"devto"
],
"categories": [
"CANVAS"
],
"metadata": [
{
"key": "POWERAPPS-EXPERIMENTAL",
"value": "No"
},
{
"key": "POWERAPPS-PREMIUM",
"value": "Yes"
},
{
"key": "POWERAPPS-ONPREM",
"value": "No"
},
{
"key": "POWERAPPS-CUSTOMCONNECTOR",
"value": "No"
}
],
"thumbnails": [
{
"type": "image",
"order": 100,
"url": "https://github.com/pnp/powerplatform-samples/raw/main/samples/forem/assets/forem.png",
"alt": "App preview"
}
],
"authors": [
{
"gitHubAccount": "laskewitz",
"pictureUrl": "https://github.com/laskewitz.png",
"name": "Daniel Laskewitz"
}
],
"references": [
{
"name": "Microsoft Power Platform documentation",
"description": "Discover how to make the most of Microsoft Power Platform products with online training courses, docs, and videos covering product capabilities and how-to guides.",
"url": "https://learn.microsoft.com/power-platform/"
},
{
"name": "Creator Kit",
"description": "The Creator Kit helps create Power Apps experiences on the web and mobile platforms with convenient components that are ubiquitous in modern software.",
"url": "https://learn.microsoft.com/power-platform/guidance/creator-kit/setup"
},
{
"name": "Dev.To",
"description": "DEV Community is a community of amazing developers. A place where coders share, stay up-to-date and grow their careers.",
"url": "https://dev.to"
}
]
}
]
Binary file added samples/forem/solution/forem.zip
Binary file not shown.
54 changes: 54 additions & 0 deletions samples/forem/sourcecode/Forem.cdsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PowerAppsTargetsPath>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\PowerApps</PowerAppsTargetsPath>
</PropertyGroup>

<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
<Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.props" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.props')" />

<PropertyGroup>
<ProjectGuid>a7903b7d-6dac-4a77-a0eb-c7b48ed34ea6</ProjectGuid>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<!--Remove TargetFramework when this is available in 16.1-->
<TargetFramework>net462</TargetFramework>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<SolutionRootPath>src</SolutionRootPath>
</PropertyGroup>

<!--
Solution Packager overrides, un-comment to use: SolutionPackagerType (Managed, Unmanaged, Both)
Solution Localization Control, if you want to enabled localization of your solution, un-comment SolutionPackageEnableLocalization and set the value to true. - Requires use of -loc flag on Solution Clone or Sync
-->
<!--
<PropertyGroup>
<SolutionPackageType>Managed</SolutionPackageType>
<SolutionPackageEnableLocalization>false</SolutionPackageEnableLocalization>
</PropertyGroup>
-->

<ItemGroup>
<PackageReference Include="Microsoft.PowerApps.MSBuild.Solution" Version="1.*" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\.gitignore" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\bin\**" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\obj\**" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.cdsproj" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.cdsproj.user" />
<ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.sln" />
</ItemGroup>

<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)\**" Exclude="@(ExcludeDirectories)" />
<Content Include="$(SolutionPackageZipFilePath)">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
<Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.targets" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Solution.targets')" />

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<CanvasApp xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Name>ppa_devtoapp_393c5</Name>
<AppVersion>2023-11-10T15:08:51Z</AppVersion>
<Status>Ready</Status>
<CreatedByClientVersion>3.23104.18.0</CreatedByClientVersion>
<MinClientVersion>3.23104.18.0</MinClientVersion>
<Tags>{"primaryDeviceWidth":"1366","primaryDeviceHeight":"768","supportsPortrait":"true","supportsLandscape":"true","primaryFormFactor":"Tablet","publisherVersion":"3.23104.18","minimumRequiredApiVersion":"2.2.0","hasComponent":"false","hasUnlockedComponent":"false","isUnifiedRootApp":"false","sienaVersion":"20230801T133957Z-3.23073.23.0","showStatusBar":"false"}</Tags>
<IsCdsUpgraded>0</IsCdsUpgraded>
<GalleryItemId xsi:nil="true"></GalleryItemId>
<BackgroundColor>rgba(255, 255, 255, 1)</BackgroundColor>
<DisplayName>DevTO App</DisplayName>
<Description xsi:nil="true"></Description>
<CommitMessage xsi:nil="true"></CommitMessage>
<Publisher></Publisher>
<AuthorizationReferences>[]</AuthorizationReferences>
<ConnectionReferences>{"0e39c322-a110-46d0-9770-64639f884779":{"id":"/providers/microsoft.powerapps/apis/shared_foremip","displayName":"Forem (Independent Publisher)","iconUri":"https://connectoricons-prod.azureedge.net/u/v-sriyen/FastrakTrainApril11/1.0.1631.3265/foremip/icon.png","dataSources":["Forem(IndependentPublisher)"],"dependencies":[],"dependents":[],"parameterHints":{},"parameterHintsV2":{},"isOnPremiseConnection":false,"bypassConsent":false,"dataSets":{},"apiTier":"Premium","actions":["GetArticles","GetMyUnpublishedArticles"]}}</ConnectionReferences>
<DatabaseReferences>{"default.cds":{"databaseDetails":{"referenceType":"Environmental","environmentName":"default.cds","overrideValues":{"status":"NotSpecified"}},"dataSources":{},"components":[{"componentName":"CustomControl","identifier":"cat_PowerCAT.Pivot","identifierType":"LogicalName","capabilities":{"pcfExternalServiceUsageAllowed":false}},{"componentName":"CustomControl","identifier":"cat_PowerCAT.SearchBox","identifierType":"LogicalName","capabilities":{"pcfExternalServiceUsageAllowed":false}},{"componentName":"CustomControl","identifier":"cat_PowerCAT.FluentDetailsList","identifierType":"LogicalName","capabilities":{"pcfExternalServiceUsageAllowed":false}},{"componentName":"CustomControl","identifier":"cat_PowerCAT.CommandBar","identifierType":"LogicalName","capabilities":{"pcfExternalServiceUsageAllowed":false}}]}}</DatabaseReferences>
<AppComponents>[]</AppComponents>
<AppComponentDependencies>[]</AppComponentDependencies>
<CanConsumeAppPass>1</CanConsumeAppPass>
<CanvasAppType>0</CanvasAppType>
<BypassConsent>0</BypassConsent>
<AdminControlBypassConsent>0</AdminControlBypassConsent>
<EmbeddedApp xsi:nil="true"></EmbeddedApp>
<IntroducedVersion>1.0</IntroducedVersion>
<CdsDependencies>{"cdsdependencies":[{"dependencyid":"","logicalname":"cat_PowerCAT.Pivot","componenttype":66,"componenttypeplatformname":"CustomControl"},{"dependencyid":"","logicalname":"cat_PowerCAT.SearchBox","componenttype":66,"componenttypeplatformname":"CustomControl"},{"dependencyid":"","logicalname":"cat_PowerCAT.FluentDetailsList","componenttype":66,"componenttypeplatformname":"CustomControl"},{"dependencyid":"","logicalname":"cat_PowerCAT.CommandBar","componenttype":66,"componenttypeplatformname":"CustomControl"}]}</CdsDependencies>
<IsCustomizable>1</IsCustomizable>
<BackgroundImageUri>/CanvasApps/ppa_devtoapp_393c5_BackgroundImageUri</BackgroundImageUri>
<DocumentUri>/CanvasApps/ppa_devtoapp_393c5_DocumentUri.msapp</DocumentUri>
</CanvasApp>
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"Content": "Image",
"FileName": "/ctrllib/image/images/SampleImage.svg",
"IsSampleData": true,
"IsWritable": false,
"Name": "SampleImage",
"Path": "/ctrllib/image/images/SampleImage.svg",
"ResourceKind": "Uri",
"RootPath": "ms-appx:///ctrllib/image/images/SampleImage.svg",
"Schema": "i",
"Type": "ResourceInfo"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"FormatVersion": "0.24",
"Header": {
"AnalysisOptions": {
"DataflowAnalysisEnabled": false,
"DataflowAnalysisFlagStateToggledByUser": false
},
"DocVersion": "1.335",
"MinVersionToLoad": "1.331",
"MSAppStructureVersion": "2.0"
},
"Properties": {
"AppCreationSource": "AppFromScratch",
"AppDescription": "",
"AppPreviewFlagsMap": {
"aibuilderserviceenrollment": false,
"allowmultiplescreensincanvaspages": false,
"appinsightserrortracing": false,
"appinstrumentationcorrelationtracing": false,
"autocreateenvironmentvariables": false,
"behaviorpropertyui": false,
"blockmovingcontrol": true,
"cdsdataformatting": false,
"classiccontrols": false,
"consistentreturnschemafortabularfunctions": true,
"copyandmerge": false,
"dataflowanalysisenabled": false,
"datatablev2control": true,
"dataverseactionsenabled": false,
"delaycontrolrendering": true,
"delayloadscreens": true,
"disablecdsfileandlargeimage": false,
"dynamicschema": false,
"enableappembeddingux": false,
"enablechatbotfeature": false,
"enablecomponentnamemaps": false,
"enablecomponentscopeoldbehavior": false,
"enablecopilotcontrol": false,
"enabledataverseoffline": false,
"enableeditcacherefreshfrequency": false,
"enableexcelonlinebusinessv2connector": true,
"enableexperimentaldataverseoffline": false,
"enableideaspanel": true,
"enablelegacybarcodescanner": false,
"enableonstart": true,
"enableonstartnavigate": false,
"enablepcfmoderndatasets": true,
"enablerowscopeonetonexpand": false,
"enablerpawarecomponentdependency": true,
"enablerulespanel": false,
"enableruntimepolicies": false,
"enablesaveloadcleardataonweb": false,
"enableupdateifdelegation": false,
"errorhandling": true,
"expandedsavedatasupport": true,
"exportimportcomponents2": true,
"externalmessage": false,
"fluentv9controls": false,
"fluentv9controlspreview": false,
"formuladataprefetch": true,
"formularepair": false,
"generatedebugpublishedapp": false,
"herocontrols": false,
"improvedmediacapture": false,
"improvedtabstopbehavior": false,
"isemptyrequirestableargument": true,
"keeprecentscreensloaded": false,
"longlivingcache": false,
"mobilenativerendering": false,
"namedformulas": false,
"nativecdsexperimental": true,
"onegrid": false,
"optimizedforteamsmeeting": false,
"packagemodernruntime": false,
"parallelcodegen": false,
"pdffunction": false,
"powerfxdecimal": false,
"powerfxv1": false,
"projectionmapping": true,
"reactformulabar": false,
"reliableconcurrent": true,
"reservedkeywords": false,
"reverttooldpowerautomate": false,
"rtlinstudiopreview": false,
"rtlsupport": false,
"smartemaildatacard": false,
"supportcolumnnamesasidentifiers": false,
"tabledoesntwraprecords": true,
"usedisplaynamemetadata": true,
"useenforcesavedatalimits": true,
"useexperimentalcdsconnector": true,
"useexperimentalsqlconnector": true,
"useguiddatatypes": true,
"usenonblockingonstartrule": true,
"webbarcodescanner": false,
"zeroalltabindexes": false
},
"Author": "",
"BindingErrorCount": 0,
"ContainsThirdPartyPcfControls": true,
"DefaultConnectedDataSourceMaxGetRowsCount": 500,
"DocumentAppType": "DesktopOrTablet",
"DocumentLayoutHeight": 768,
"DocumentLayoutLockOrientation": false,
"DocumentLayoutMaintainAspectRatio": true,
"DocumentLayoutOrientation": "landscape",
"DocumentLayoutScaleToFit": true,
"DocumentLayoutWidth": 1366,
"DocumentType": "App",
"EnableInstrumentation": false,
"FileID": "0ec7acb8-5f92-4172-bea6-1fc9f3528add",
"Id": "0ec7acb8-5f92-4172-bea6-1fc9f3528add",
"InstrumentationKey": "",
"ManualOfflineProfileId": "",
"Name": "DevTO App",
"OriginatingVersion": "1.326",
"ParserErrorCount": 0,
"ShowStatusBar": false
},
"PublishInfo": {
"AppName": "DevTO App",
"BackgroundColor": "rgba(255, 255, 255, 1)",
"IconColor": "RGBA(255,255,255,1)",
"IconName": "",
"LogoFileName": "logo.jpg",
"PublishDataLocally": false,
"PublishResourcesLocally": false,
"PublishTarget": "player",
"UserLocale": "en-US"
},
"ScreenOrder": [
"Home Screen"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Loading
Loading