This repository was archived by the owner on Oct 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
CA 851 - instagram on home/crowdaction pages #407
Open
timstokman
wants to merge
29
commits into
master
Choose a base branch
from
CA-851
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
9fa468b
Instagram module
JBijker 7a88802
Backend for instagram API + image proxy
timstokman d89e0ae
instagram wall for root queries as well
timstokman 6d28d93
Display instagram wall using new api
timstokman 8a0b344
Seed instagram users better
timstokman 6e19ec4
Fix insta display issues
timstokman 7936703
Allow editting instagram in admin ui
timstokman 0193252
Add instagram user to start project form
timstokman 0c028b1
tweak submit
timstokman c10f881
Add id for caching, add last-modified for caching
timstokman 26b7b04
Formattnig differently
timstokman b97181d
Add debug logging why json is failing
timstokman 0af0aa5
Better logging..
timstokman 487aacd
To loginfo so it doesn't get lost
timstokman 8e08a16
Only debug logging
timstokman 05da497
Add cndinstagram to allowed proxy hosts
timstokman 6dceedf
Caching timeout a little higher
timstokman 59e78fa
Exclude test in github actions because instagram is blocked
timstokman 2eea786
Add comment why we're skipping
timstokman f40a98c
Add more cdns
timstokman 6c4a01a
Tweak comments
timstokman 85be25e
Enable range processing for proxying videos
timstokman 6d9902d
Code review comments
857f461
Naming
5ca92e7
Merge master
timstokman 8f52720
Merge branch 'CA-851' of https://github.com/CollActionteam/CollAction…
timstokman 6227924
Fix build issues
timstokman a767f4e
Merge master
timstokman 746b502
Merge branch 'master' into CA-851
timstokman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
CollAction.Tests/Integration/Service/InstagramServiceTests.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| using CollAction.Services.Instagram; | ||
| using Microsoft.Extensions.DependencyInjection; | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Threading; | ||
| using System.Threading.Tasks; | ||
| using Xunit; | ||
|
|
||
| namespace CollAction.Tests.Integration.Service | ||
| { | ||
| [Trait("Category", "Integration")] | ||
| [Trait("SkipInActions", "true")] // Instagram blocks github actions ips, probably marked as spammer | ||
| public sealed class InstagramServiceTests : IntegrationTestBase | ||
| { | ||
| private readonly IInstagramService instagramService; | ||
|
|
||
| public InstagramServiceTests(): base(false) | ||
| { | ||
| instagramService = Scope.ServiceProvider.GetRequiredService<IInstagramService>(); | ||
| } | ||
|
|
||
| [Fact] | ||
| public async Task TestInstagramApi() | ||
| { | ||
| var result = await instagramService.GetItems("slowfashionseason", CancellationToken.None).ConfigureAwait(false); | ||
| Assert.True(result.Any()); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| using CollAction.Services.Proxy; | ||
| using Microsoft.AspNetCore.Mvc; | ||
| using System; | ||
| using System.Threading; | ||
| using System.Threading.Tasks; | ||
|
|
||
| namespace CollAction.Controllers | ||
| { | ||
| [Route("proxy")] | ||
| [ApiController] | ||
| public sealed class ProxyController | ||
| { | ||
| private readonly IProxyService proxyService; | ||
|
|
||
| public ProxyController(IProxyService proxyService) | ||
| { | ||
| this.proxyService = proxyService; | ||
| } | ||
|
|
||
| [HttpGet] | ||
| public Task<IActionResult> Proxy(Uri url, CancellationToken token) | ||
| => proxyService.Proxy(url, token); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| using CollAction.Services.Instagram.Models; | ||
| using GraphQL.Types; | ||
|
|
||
| namespace CollAction.GraphQl.Queries | ||
| { | ||
| public sealed class InstagramWallItemGraph : ObjectGraphType<InstagramWallItem> | ||
| { | ||
| public InstagramWallItemGraph() | ||
| { | ||
| Field<IdGraphType>("id", resolve: x => x.Source.ShortCode); | ||
| Field(x => x.ShortCode); | ||
| Field(x => x.Link); | ||
| Field(x => x.Date); | ||
| Field(x => x.AccessibilityCaption, true); | ||
| Field(x => x.Caption, true); | ||
| Field(x => x.ThumbnailSrc); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.