Comments (5)
The repository json actually has a property called slug.
For my own project I use a custom Repository POCO for this.
namespace BitbucketPocos
{
public class Repository
{
public Project project { get; set; }
public string scm { get; set; }
public bool? has_wiki { get; set; }
public string description { get; set; }
public Links links { get; set; }
public string fork_policy { get; set; }
public string language { get; set; }
public string created_on { get; set; }
public string full_name { get; set; }
public bool? has_issues { get; set; }
public Owner owner { get; set; }
public string updated_on { get; set; }
public ulong? size { get; set; }
public bool? is_private { get; set; }
public string name { get; set; }
public string uuid { get; set; }
public string slug { get; set; }
}
}
Meanwhile you could also translate the repository to a slug using the code I used in this PR here: https://github.com/MitjaBezensek/SharpBucket/pull/70/files
from sharpbucket.
@mnivet Now that Repository
has a slug
property, should this be cleaned up? Looking at the API, it seems that all of the repo methods want the slug, not the name. Probably all of the parameter names should be changed from repository
to slug
or repositorySlug
to make this clear, and the methods themselves should use the slug
property. I can work on a PR.
from sharpbucket.
Actually, the API can take the slug
or the {UUID}
.
from sharpbucket.
When you want to create a new repository (which is the goal of PostRepository) you can't know the UUID, and it's not your duty to guess how names should be transformed to be a valid slug
The pull request #70 done by @anh-duc-le is now re-integrated and do what was needed :
transform the repository name into a slug (code that is called behind the PostRepository method)
So maybe there is still some clean up re-factoring to perform to rename parameter names from repository
to repositorySlug
like you suggest @asherber
But since the fix is re-integrated let's close that issue and I let you open another one if you think that doing some parameter renaming is really necessary
from sharpbucket.
Thanks, I'll take a closer look at the code, but it seems to me that the RepositoryResource
methods could all do with a little cleanup to make their intent cleaner.
from sharpbucket.
Related Issues (20)
- Commit filtering? HOT 2
- How to make a commit? HOT 2
- PullRequest activity endpoints missing approval data HOT 3
- How to list the tags my repository? HOT 2
- Is there any way to get text the pull request? HOT 2
- I have the description of the Pull Request formatted. Example: bold, list, table, images. How can I get this Html for a friendlier presentation? HOT 2
- How do I get the last pull request from the master? to avoid the problem I'm having slow. method used: .GetPullRequestLog () HOT 2
- Project Filter on RepositoriesEndPoint HOT 2
- Expose Enumerate... methods in addition to existing List... methods HOT 2
- Add support of async methods
- Expose async methods in addition of existing methods HOT 1
- Add support of IAsyncEnumerable<T> for Enumerate methods
- Expose Enumerate_Async methods in addition to existing List... methods HOT 1
- Support for issues HOT 7
- Tag POCO is incomplete HOT 1
- The PullRequest POCO is missing an HTML link
- Clone and Fetch HOT 1
- Implement OathToken Refresh
- Comment all public types and members
- Tag creation operation missing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharpbucket.