ListResourcesByPrefixParams - Mark ResourceType Enum as FLAG

Open
#362 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
api

Research direction

Start by locating ListResourcesByPrefixParams and the ResourceType enum in the Cloudinary .NET SDK. Review how ListResourcesAsync serializes ResourceType, then verify that selecting both image and video resources works without requiring two requests; done means the combined request returns both resource types.

Written by the indexing model from the issue text.

Description

Feature request for Cloudinary .NET SDK

Mark resourceType enum with flag so you could specify both images and videos

image

Explain your use case

Currently you have to do something like this to retrieve both images and photos:

var @params1 = new ListResourcesByPrefixParams
{
    ResourceType = ResourceType.Video,
    Type = "upload",
    Prefix = "SomeFolder",
};

var resources1 = await _cloudinary.ListResourcesAsync(@params1);

var @params2 = new ListResourcesByPrefixParams
{
    ResourceType = ResourceType.Image,
    Type = "upload",
    Prefix = "SomeFolder",
};

var resources2 = await _cloudinary.ListResourcesAsync(@params1);

var resources = resources1.Resources.Concat(resources2.Resources);
Dominant language
C#
Stars
105
Forks
72
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudinary/CloudinaryDotNet

All issues in cloudinary/CloudinaryDotNet

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.