I want to retrieve a list of a user's bitbucket repositories. I would like to do it similar to the way I did with to retrieve github repositories.
Or it can be different.
Here is the code I used for getting github repositories.
<script type="text/javascript">
$(function() {
$.ajax({
type: "GET",
url: "https://api.github.com/users/matthew2d/repos",
dataType: "json",
success: function(result) {
for (i in result) {
$("#repo_list").append(
"<li><a href='" + result[i].html_url + "' target='_blank'>" +
result[i].name + "</a></li>"
);
console.log("i: " + i);
}
console.log(result);
$("#repo_count").append(" " + result.length);
}
});
});
</script>
<li id="ourTab" class="profileContent">
<div class="githubTitle">Repositories - <div id="repo_count" style="margin-left: 95px;margin-top: -19px;"></div></div>
<div id="repos">
<ul id="repo_list" ></ul>
</div>
<div id="repo_content">
</div>
</li>
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.