### Example Response for Get Repositories Source: https://docs.bountylab.io/api/typescript/resources/raw_repos/methods/by_fullname This is a sample JSON response structure for a successful repository query, including details about the repository, its owner, and contributors. ```json { "count": 2, "repositories": [ { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", "name": "Hello-World", "ownerLogin": "octocat", "stargazerCount": 1500, "totalIssuesClosed": 108, "totalIssuesCount": 150, "totalIssuesOpen": 42, "contributors": { "edges": [ { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDQ6VXNlcjU4MzIzMQ==", "login": "octocat", "bio": "I build things for GitHub", "company": "GitHub", "createdAt": "2011-01-25T18:44:36Z", "displayName": "The Octocat", "emails": [ "***at@github.com", "***hn@gmail.com" ], "embeddedAt": "2024-01-15T14:00:00Z", "location": "San Francisco, CA", "resolvedCity": "San Francisco", "resolvedCountry": "United States", "resolvedState": "California", "score": 0.12, "socialAccounts": [ { "provider": "twitter", "url": "https://twitter.com/github" } ], "updatedAt": "2024-01-15T12:30:00Z", "websiteUrl": "https://github.blog" } ], "pageInfo": { "endCursor": "endCursor", "hasNextPage": true } }, "createdAt": "2011-01-26T19:01:12Z", "description": "My first repository on GitHub!", "embeddedAt": "2024-01-15T14:00:00Z", "language": "JavaScript", "lastContributorLocations": [ "San Francisco, CA", "Berlin, Germany" ], "owner": { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDQ6VXNlcjU4MzIzMQ==", "login": "octocat", "bio": "I build things for GitHub", "company": "GitHub", "createdAt": "2011-01-25T18:44:36Z", "displayName": "The Octocat", "emails": [ "***at@github.com", "***hn@gmail.com" ], "embeddedAt": "2024-01-15T14:00:00Z", "location": "San Francisco, CA", "resolvedCity": "San Francisco", "resolvedCountry": "United States", "resolvedState": "California", "score": 0.12, "socialAccounts": [ { "provider": "twitter", "url": "https://twitter.com/github" } ], "updatedAt": "2024-01-15T12:30:00Z", "websiteUrl": "https://github.blog" }, "ownerDevrank": { "community": 0, "crackedScore": 0, "createdAt": "createdAt", "followersIn": 0, "followingOut": 0, "pc": 0, "rawScore": 0, "tier": "tier", "trust": 0, "updatedAt": "updatedAt" }, "ownerProfessional": { "awards": [ "string" ], "certifications": [ "string" ], "city": "city", "connectionsCount": 0, "country": "country", "currentIndustry": "currentIndustry", "departments": [ "string" ], "education": [ { "campus": "campus", "endDate": "endDate", "major": "major", "specialization": "specialization", "startDate": "startDate" } ], "experience": [ { "company": "company", "endDate": "endDate", "industry": "industry", "isCurrent": true, "location": "location", "startDate": "startDate", "summary": "summary", "title": "title" } ], "expertise": [ "string" ], "firstName": "firstName", "followerCount": 0, "functionalArea": "functionalArea", "headline": "headline", "languages": [ "string" ], "lastName": "lastName", "linkedinUrl": "linkedinUrl", "location": "location", "memberships": [ "string" ], "organization": "organization", "patents": [ "string" ], "priorIndustries": [ "string" ], "publications": [ "string" ], "seniority": "seniority", "seniorityLevel": "seniorityLevel", "state": "state", "title": "title" }, "readmePreview": "# Hello World\n\nThis is my first repository...", "score": 0.08, "starrers": { ``` -------------------------------- ### Example response for getting users Source: https://docs.bountylab.io/api/resources/raw_users/methods/by_login This is a sample successful response (200 OK) when querying for users by their GitHub usernames. It includes user aggregates, bio, company, and contribution details. ```json { "count": 2, "users": [ { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDQ6VXNlcjU4MzIzMQ==", "login": "octocat", "aggregates": { "totalStars": 12500 }, "bio": "I build things for GitHub", "company": "GitHub", "contributes": { "edges": [ { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", "name": "Hello-World", "ownerLogin": "octocat", "stargazerCount": 1500, "totalIssuesClosed": 108, "totalIssuesCount": 150, "totalIssuesOpen": 42, "contributors": { "edges": [ { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDQ6VXNlcjU4MzIzMQ==", "login": "octocat", "bio": "I build things for GitHub", "company": "GitHub", "createdAt": "2011-01-25T18:44:36Z", "displayName": "The Octocat", "emails": [ "***at@github.com", "***hn@gmail.com" ], "embeddedAt": "2024-01-15T14:00:00Z", "location": "San Francisco, CA", "resolvedCity": "San Francisco", "resolvedCountry": "United States", "resolvedState": "California", "score": 0.12, "socialAccounts": [ { "provider": "twitter", "url": "https://twitter.com/github" } ], "updatedAt": "2024-01-15T12:30:00Z", "websiteUrl": "https://github.blog" } ], "pageInfo": { "endCursor": "endCursor", "hasNextPage": true } }, "createdAt": "2011-01-26T19:01:12Z", "description": "My first repository on GitHub!", "embeddedAt": "2024-01-15T14:00:00Z", "language": "JavaScript", "lastContributorLocations": [ "San Francisco, CA", "Berlin, Germany" ], "owner": { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDQ6VXNlcjU4MzIzMQ==", "login": "octocat", "bio": "I build things for GitHub", "company": "GitHub", "createdAt": "2011-01-25T18:44:36Z", "displayName": "The Octocat", "emails": [ "***at@github.com", "***hn@gmail.com" ], "embeddedAt": "2024-01-15T14:00:00Z", "location": "San Francisco, CA", "resolvedCity": "San Francisco", "resolvedCountry": "United States", "resolvedState": "California", "score": 0.12, "socialAccounts": [ { "provider": "twitter", "url": "https://twitter.com/github" } ], "updatedAt": "2024-01-15T12:30:00Z", "websiteUrl": "https://github.blog" }, "ownerDevrank": { "community": 0, "crackedScore": 0, "createdAt": "createdAt", "followersIn": 0, "followingOut": 0, "pc": 0, "rawScore": 0, "tier": "tier", "trust": 0, "updatedAt": "updatedAt" }, "ownerProfessional": { "awards": [ "string" ], "certifications": [ "string" ], "city": "city", "connectionsCount": 0, "country": "country", "currentIndustry": "currentIndustry", "departments": [ "string" ], "education": [ { "campus": "campus", "endDate": "endDate", "major": "major", "specialization": "specialization", "startDate": "startDate" } ], "experience": [ { "company": "company", "endDate": "endDate", "industry": "industry", "isCurrent": true, "location": "location" } ] } } ], "pageInfo": { "endCursor": "endCursor", "hasNextPage": true } } } ] } ``` -------------------------------- ### Install Bountylab with aiohttp support Source: https://docs.bountylab.io/api/python Install the library with aiohttp support for improved concurrency performance in asynchronous operations. ```bash pip install bountylab[aiohttp] ``` -------------------------------- ### Install Bountylab Python Library Source: https://docs.bountylab.io/api/python Install the library from PyPI using pip. Ensure you are using Python 3.9+. ```bash pip install bountylab ``` -------------------------------- ### Install BountyLab TypeScript Library Source: https://docs.bountylab.io/api Install the BountyLab TypeScript library using npm. Ensure you have Node.js and npm installed. ```bash npm install @bountylab/bountylab ``` -------------------------------- ### Install Bounty Lab TypeScript SDK Source: https://docs.bountylab.io/guides/quickstart Install the Bounty Lab SDK using npm, pnpm, or bun. Ensure you have Node.js 18+ or Bun runtime installed. ```bash npm install @bountylab/bountylab ``` ```bash pnpm add @bountylab/bountylab ``` ```bash bun add @bountylab/bountylab ``` -------------------------------- ### Install Bounty Lab SDK Source: https://docs.bountylab.io/ Install the Bounty Lab SDK for TypeScript/JavaScript using npm or for Python using pip. ```bash # TypeScript/JavaScript npm install @bountylab/bountylab # Python pip install bountylab ``` -------------------------------- ### Example Raw Repository Response Source: https://docs.bountylab.io/api/python/resources/raw_repos/methods/retrieve This is an example of the JSON response structure when retrieving raw repository data. It includes details about the repository, its owner, and contributors. ```json { "count": 2, "repositories": [ { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", "name": "Hello-World", "ownerLogin": "octocat", "stargazerCount": 1500, "totalIssuesClosed": 108, "totalIssuesCount": 150, "totalIssuesOpen": 42, "contributors": { "edges": [ { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDQ6VXNlcjU4MzIzMQ==", "login": "octocat", "bio": "I build things for GitHub", "company": "GitHub", "createdAt": "2011-01-25T18:44:36Z", "displayName": "The Octocat", "emails": [ "***at@github.com", "***hn@gmail.com" ], "embeddedAt": "2024-01-15T14:00:00Z", "location": "San Francisco, CA", "resolvedCity": "San Francisco", "resolvedCountry": "United States", "resolvedState": "California", "score": 0.12, "socialAccounts": [ { "provider": "twitter", "url": "https://twitter.com/github" } ], "updatedAt": "2024-01-15T12:30:00Z", "websiteUrl": "https://github.blog" } ], "pageInfo": { "endCursor": "endCursor", "hasNextPage": true } }, "createdAt": "2011-01-26T19:01:12Z", "description": "My first repository on GitHub!", "embeddedAt": "2024-01-15T14:00:00Z", "language": "JavaScript", "lastContributorLocations": [ "San Francisco, CA", "Berlin, Germany" ], "owner": { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDQ6VXNlcjU4MzIzMQ==", "login": "octocat", "bio": "I build things for GitHub", "company": "GitHub", "createdAt": "2011-01-25T18:44:36Z", "displayName": "The Octocat", "emails": [ "***at@github.com", "***hn@gmail.com" ], "embeddedAt": "2024-01-15T14:00:00Z", "location": "San Francisco, CA", "resolvedCity": "San Francisco", "resolvedCountry": "United States", "resolvedState": "California", "score": 0.12, "socialAccounts": [ { "provider": "twitter", "url": "https://twitter.com/github" } ], "updatedAt": "2024-01-15T12:30:00Z", "websiteUrl": "https://github.blog" }, "ownerDevrank": { "community": 0, "crackedScore": 0, "createdAt": "createdAt", "followersIn": 0, "followingOut": 0, "pc": 0, "rawScore": 0, "tier": "tier", "trust": 0, "updatedAt": "updatedAt" }, "ownerProfessional": { "awards": [ "string" ], "certifications": [ "string" ], "city": "city", "connectionsCount": 0, "country": "country", "currentIndustry": "currentIndustry", "departments": [ "string" ], "education": [ { "campus": "campus", "endDate": "endDate", "major": "major", "specialization": "specialization", "startDate": "startDate" } ], "experience": [ { "company": "company", "endDate": "endDate", "industry": "industry", "isCurrent": true, "location": "location", "startDate": "startDate", "summary": "summary", "title": "title" } ], "expertise": [ "string" ], "firstName": "firstName", "followerCount": 0, "functionalArea": "functionalArea", "headline": "headline", "languages": [ "string" ], "lastName": "lastName", "linkedinUrl": "linkedinUrl", "location": "location", "memberships": [ "string" ], "organization": "organization", "patents": [ "string" ], "priorIndustries": [ "string" ], "publications": [ "string" ], "seniority": "seniority", "seniorityLevel": "seniorityLevel", "state": "state", "title": "title" }, "readmePreview": "# Hello World\n\nThis is my first repository...", "score": 0.08 } ] } ``` -------------------------------- ### Direct GraphQL API Call Example Source: https://docs.bountylab.io/guides/graphql-proxy This example shows how to call the GitHub GraphQL API directly, requiring a personal access token and manual rate limit management. ```curl # Direct GraphQL API call curl -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -X POST \ -d '{"query":"{ viewer { login name } }"}' \ https://api.github.com/graphql ``` -------------------------------- ### Successful Response Example Source: https://docs.bountylab.io/api/resources/raw_repos/methods/by_fullname This is an example of a successful JSON response when retrieving repository information. It includes details such as repository name, owner, star count, issue counts, and contributor information. ```json { "count": 2, "repositories": [ { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", "name": "Hello-World", "ownerLogin": "octocat", "stargazerCount": 1500, "totalIssuesClosed": 108, "totalIssuesCount": 150, "totalIssuesOpen": 42, "contributors": { "edges": [ { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDQ6VXNlcjU4MzIzMQ==", "login": "octocat", "bio": "I build things for GitHub", "company": "GitHub", "createdAt": "2011-01-25T18:44:36Z", "displayName": "The Octocat", "emails": [ "***at@github.com", "***hn@gmail.com" ], "embeddedAt": "2024-01-15T14:00:00Z", "location": "San Francisco, CA", "resolvedCity": "San Francisco", "resolvedCountry": "United States", "resolvedState": "California", "score": 0.12, "socialAccounts": [ { "provider": "twitter", "url": "https://twitter.com/github" } ], "updatedAt": "2024-01-15T12:30:00Z", "websiteUrl": "https://github.blog" } ], "pageInfo": { "endCursor": "endCursor", "hasNextPage": true } }, "createdAt": "2011-01-26T19:01:12Z", "description": "My first repository on GitHub!", "embeddedAt": "2024-01-15T14:00:00Z", "language": "JavaScript", "lastContributorLocations": [ "San Francisco, CA", "Berlin, Germany" ], "owner": { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDQ6VXNlcjU4MzIzMQ==", "login": "octocat", "bio": "I build things for GitHub", "company": "GitHub", "createdAt": "2011-01-25T18:44:36Z", "displayName": "The Octocat", "emails": [ "***at@github.com", "***hn@gmail.com" ], "embeddedAt": "2024-01-15T14:00:00Z", "location": "San Francisco, CA", "resolvedCity": "San Francisco", "resolvedCountry": "United States", "resolvedState": "California", "score": 0.12, "socialAccounts": [ { "provider": "twitter", "url": "https://twitter.com/github" } ], "updatedAt": "2024-01-15T12:30:00Z", "websiteUrl": "https://github.blog" }, "ownerDevrank": { "community": 0, "crackedScore": 0, "createdAt": "createdAt", "followersIn": 0, "followingOut": 0, "pc": 0, "rawScore": 0, "tier": "tier", "trust": 0, "updatedAt": "updatedAt" }, "ownerProfessional": { "awards": [ "string" ], "certifications": [ "string" ], "city": "city", "connectionsCount": 0, "country": "country", "currentIndustry": "currentIndustry", "departments": [ "string" ], "education": [ { "campus": "campus", "endDate": "endDate", "major": "major", "specialization": "specialization", "startDate": "startDate" } ], "experience": [ { "company": "company", "endDate": "endDate", "industry": "industry", "isCurrent": true, "location": "location", "startDate": "startDate", "summary": "summary", "title": "title" } ], "expertise": [ "string" ], "firstName": "firstName", "followerCount": 0, "functionalArea": "functionalArea", "headline": "headline", "languages": [ "string" ], "lastName": "lastName", "linkedinUrl": "linkedinUrl", "location": "location", "memberships": [ "string" ], "organization": "organization", "patents": [ "string" ], "priorIndustries": [ "string" ], "publications": [ "string" ], "seniority": "seniority", "seniorityLevel": "seniorityLevel", "state": "state", "title": "title" }, "readmePreview": "# Hello World\n\nThis is my first repository...", "score": 0.08, "starrers": { "edges": [ { ``` -------------------------------- ### Example API Response for Users Source: https://docs.bountylab.io/api/typescript/resources/raw_users/methods/by_login This is an example of a successful API response when fetching user data. It includes user aggregates, bio, company, and contribution details. ```json { "count": 2, "users": [ { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDQ6VXNlcjU4MzIzMQ==", "login": "octocat", "aggregates": { "totalStars": 12500 }, "bio": "I build things for GitHub", "company": "GitHub", "contributes": { "edges": [ { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", "name": "Hello-World", "ownerLogin": "octocat", "stargazerCount": 1500, "totalIssuesClosed": 108, "totalIssuesCount": 150, "totalIssuesOpen": 42, "contributors": { "edges": [ { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDQ6VXNlcjU4MzIzMQ==", "login": "octocat", "bio": "I build things for GitHub", "company": "GitHub", "createdAt": "2011-01-25T18:44:36Z", "displayName": "The Octocat", "emails": [ "***at@github.com", "***hn@gmail.com" ], "embeddedAt": "2024-01-15T14:00:00Z", "location": "San Francisco, CA", "resolvedCity": "San Francisco", "resolvedCountry": "United States", "resolvedState": "California", "score": 0.12, "socialAccounts": [ { "provider": "twitter", "url": "https://twitter.com/github" } ], "updatedAt": "2024-01-15T12:30:00Z", "websiteUrl": "https://github.blog" } ], "pageInfo": { "endCursor": "endCursor", "hasNextPage": true } }, "createdAt": "2011-01-26T19:01:12Z", "description": "My first repository on GitHub!", "embeddedAt": "2024-01-15T14:00:00Z", "language": "JavaScript", "lastContributorLocations": [ "San Francisco, CA", "Berlin, Germany" ], "owner": { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDQ6VXNlcjU4MzIzMQ==", "login": "octocat", "bio": "I build things for GitHub", "company": "GitHub", "createdAt": "2011-01-25T18:44:36Z", "displayName": "The Octocat", "emails": [ "***at@github.com", "***hn@gmail.com" ], "embeddedAt": "2024-01-15T14:00:00Z", "location": "San Francisco, CA", "resolvedCity": "San Francisco", "resolvedCountry": "United States", "resolvedState": "California", "score": 0.12, "socialAccounts": [ { "provider": "twitter", "url": "https://twitter.com/github" } ], "updatedAt": "2024-01-15T12:30:00Z", "websiteUrl": "https://github.blog" }, "ownerDevrank": { "community": 0, "crackedScore": 0, "createdAt": "createdAt", "followersIn": 0, "followingOut": 0, "pc": 0, "rawScore": 0, "tier": "tier", "trust": 0, "updatedAt": "updatedAt" }, "ownerProfessional": { "awards": [ "string" ], "certifications": [ "string" ], "city": "city", "connectionsCount": 0, "country": "country", "currentIndustry": "currentIndustry", "departments": [ "string" ], "education": [ { "campus": "campus", "endDate": "endDate", "major": "major", "specialization": "specialization", "startDate": "startDate" } ], "experience": [ { "company": "company", "endDate": "endDate", "industry": "industry", "isCurrent": true, ``` -------------------------------- ### GraphQL User Information Response Example Source: https://docs.bountylab.io/guides/graphql-proxy This is an example of a successful JSON response when querying for user information via the Bounty Lab GraphQL Proxy. ```json { "data": { "user": { "login": "torvalds", "name": "Linus Torvalds", "bio": "Creator of Linux", "company": "Linux Foundation", "location": "Portland, OR", "followers": { "totalCount": 182500 }, "repositories": { "totalCount": 8 } } } } ``` -------------------------------- ### API Response Example for Count Source: https://docs.bountylab.io/api/python/resources/raw_repos/methods/count This is an example of a successful response when counting repositories. The 'truncated' field indicates if the count was capped or floored. ```json { "count": 0, "truncated": true } ``` -------------------------------- ### DevRank Example Participation Coefficient (pc) Source: https://docs.bountylab.io/guides/devrank Shows example values for the 'Participation Coefficient', measuring network diversity across communities. A value of 1 indicates maximum diversity. ```text 0.0 = Siloed in one community 0.45 = Moderate cross-community connections 0.66 = Strong diversity (Advanced tier) 0.72 = Excellent diversity (Expert tier) ``` -------------------------------- ### Bounty Lab GraphQL Proxy Call Example Source: https://docs.bountylab.io/guides/graphql-proxy This example demonstrates calling the Bounty Lab GraphQL Proxy using a Bounty Lab API key, with automatic rate limit handling. ```curl # Bounty Lab GraphQL Proxy curl -H "Authorization: Bearer YOUR_BOUNTYLAB_API_KEY" \ -H "Content-Type: application/json" \ -X POST \ -d '{"query":"{ viewer { login name } }"}' \ https://api.bountylab.io/api/github/graphql ``` -------------------------------- ### Initialize Bounty Lab Client and Search Repositories Source: https://docs.bountylab.io/ Initialize the Bounty Lab client with an API key and perform a search for repositories with specific filters. Ensure your API key is set as an environment variable. ```javascript import Bountylab from "@bountylab/bountylab"; const client = new Bountylab({ apiKey: process.env.BOUNTYLAB_API_KEY, }); // Search for repositories const repos = await client.searchRepos.search({ query: "react component library", filters: { op: "And", filters: [ { field: "language", op: "Eq", value: "TypeScript" }, { field: "stargazerCount", op: "Gte", value: 1000 }, ], }, }); ``` -------------------------------- ### Configure Deno HTTP Client with Proxy Source: https://docs.bountylab.io/api/typescript Utilize Deno.createHttpClient to configure proxy settings for the fetch client. ```javascript import Bountylab from 'npm:@bountylab/bountylab'; const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } }); const client = new Bountylab({ fetchOptions: { client: httpClient, }, }); ``` -------------------------------- ### NOT Filter Example Source: https://docs.bountylab.io/reference/filter-operators Use the 'Not' operator to negate a filter condition. This example excludes repositories where the language is HTML. ```json { "op": "Not", "filter": { "field": "language", "op": "Eq", "value": "HTML" } } ``` -------------------------------- ### AND Filter Example Source: https://docs.bountylab.io/reference/filter-operators Use the 'And' operator when all conditions must match. This example filters for Python repositories with at least 1000 stars. ```json { "op": "And", "filters": [ { "field": "language", "op": "Eq", "value": "Python" }, { "field": "stargazerCount", "op": "Gte", "value": 1000 } ] } ``` -------------------------------- ### DevRank Example Cracked Scores Source: https://docs.bountylab.io/guides/devrank Illustrates example values for the 'Cracked Score', a normalized metric for developer influence ranging from 0-100. ```text 42.5 = Intermediate (average developer) 63.2 = Advanced (top ~20%) 74.7 = Expert (top ~5%) 83.6 = Expert/Elite boundary (top ~1%) ``` -------------------------------- ### 200 OK User Data Example Source: https://docs.bountylab.io/api/resources/raw_users/methods/by_login This JSON structure represents a successful response when retrieving user data. It includes user details, their contributions, and repository information. ```json { "count": 2, "users": [ { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDQ6VXNlcjU4MzIzMQ==", "login": "octocat", "aggregates": { "totalStars": 12500 }, "bio": "I build things for GitHub", "company": "GitHub", "contributes": { "edges": [ { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", "name": "Hello-World", "ownerLogin": "octocat", "stargazerCount": 1500, "totalIssuesClosed": 108, "totalIssuesCount": 150, "totalIssuesOpen": 42, "contributors": { "edges": [ { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDQ6VXNlcjU4MzIzMQ==", "login": "octocat", "bio": "I build things for GitHub", "company": "GitHub", "createdAt": "2011-01-25T18:44:36Z", "displayName": "The Octocat", "emails": [ "***at@github.com", "***hn@gmail.com" ], "embeddedAt": "2024-01-15T14:00:00Z", "location": "San Francisco, CA", "resolvedCity": "San Francisco", "resolvedCountry": "United States", "resolvedState": "California", "score": 0.12, "socialAccounts": [ { "provider": "twitter", "url": "https://twitter.com/github" } ], "updatedAt": "2024-01-15T12:30:00Z", "websiteUrl": "https://github.blog" } ], "pageInfo": { "endCursor": "endCursor", "hasNextPage": true } }, "createdAt": "2011-01-26T19:01:12Z", "description": "My first repository on GitHub!", "embeddedAt": "2024-01-15T14:00:00Z", "language": "JavaScript", "lastContributorLocations": [ "San Francisco, CA", "Berlin, Germany" ], "owner": { "id": "9f0b8901cf1848298a60a60083b5aac0", "githubId": "MDQ6VXNlcjU4MzIzMQ==", "login": "octocat", "bio": "I build things for GitHub", "company": "GitHub", "createdAt": "2011-01-25T18:44:36Z", "displayName": "The Octocat", "emails": [ "***at@github.com", "***hn@gmail.com" ], "embeddedAt": "2024-01-15T14:00:00Z", "location": "San Francisco, CA", "resolvedCity": "San Francisco", "resolvedCountry": "United States", "resolvedState": "California", "score": 0.12, "socialAccounts": [ { "provider": "twitter", "url": "https://twitter.com/github" } ], "updatedAt": "2024-01-15T12:30:00Z", "websiteUrl": "https://github.blog" }, "ownerDevrank": { "community": 0, "crackedScore": 0, "createdAt": "createdAt", "followersIn": 0, "followingOut": 0, "pc": 0, "rawScore": 0, "tier": "tier", "trust": 0, "updatedAt": "updatedAt" }, "ownerProfessional": { "awards": [ "string" ], "certifications": [ "string" ], "city": "city", "connectionsCount": 0, "country": "country", "currentIndustry": "currentIndustry", "departments": [ "string" ], "education": [ { "campus": "campus", "endDate": "endDate", "major": "major", "specialization": "specialization", "startDate": "startDate" } ], "experience": [ { "company": "company", "endDate": "endDate", "industry": "industry", "isCurrent": true, "location": "location", "startDate": "startDate", "summary": "summary", "title": "title" } ], "expertise": [ "string" ], "firstName": "firstName", "followerCount": 0 } } ], "pageInfo": { "endCursor": "endCursor", "hasNextPage": true } } } ] } ``` -------------------------------- ### Initialize Bountylab Client and Search Users Source: https://docs.bountylab.io/api/typescript Initialize the Bountylab client with an API key and perform a natural language user search. The API key is optional if using the default environment variable. ```typescript import Bountylab from '@bountylab/bountylab'; const client = new Bountylab({ apiKey: process.env['BOUNTYLAB_API_KEY'], // This is the default and can be omitted }); const response = await client.searchUsers.naturalLanguage({ query: 'Find me senior engineers who work on machine learning at big tech companies', maxResults: 10, }); console.log(response.count); ``` -------------------------------- ### OR Filter Example Source: https://docs.bountylab.io/reference/filter-operators Use the 'Or' operator when any condition can match. This example finds repositories located in either San Francisco or New York. ```json { "op": "Or", "filters": [ { "field": "resolvedCity", "op": "ContainsAllTokens", "value": "San Francisco" }, { "field": "resolvedCity", "op": "ContainsAllTokens", "value": "New York" } ] } ``` -------------------------------- ### Basic API Request with Authentication Source: https://docs.bountylab.io/guides/authentication This example demonstrates how to make a basic API request to the users endpoint, including the Authorization header with your API key and the Content-Type. ```curl curl "https://api.bountylab.io/api/raw/users/by-login" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"logins": ["octocat"]}' ``` -------------------------------- ### Async Client with aiohttp Backend Source: https://docs.bountylab.io/api/python Instantiate the asynchronous Bountylab client using DefaultAioHttpClient for the HTTP backend. This requires aiohttp to be installed. ```python import os import asyncio from bountylab import DefaultAioHttpClient from bountylab import AsyncBountylab async def main() -> None: async with AsyncBountylab( api_key=os.environ.get("BOUNTYLAB_API_KEY"), # This is the default and can be omitted http_client=DefaultAioHttpClient(), ) as client: response = await client.search_users.natural_language( query="Find me senior engineers who work on machine learning at big tech companies", max_results=10, ) print(response.count) asyncio.run(main()) ``` -------------------------------- ### DevRank Example Trust Scores Source: https://docs.bountylab.io/guides/devrank Provides example values for the 'Trust Score', the raw PageRank influence before normalization. Higher values indicate greater influence. ```text 8.27e-8 = Baseline (minimal network effect) 8.80e-8 = Slight boost from quality followers 1.50e-7 = Notable influence 2.26e-7 = Strong influence (Expert tier) ``` -------------------------------- ### Determine Installed Bountylab Version Source: https://docs.bountylab.io/api/python Check the installed version of the Bountylab library at runtime by accessing the `__version__` attribute. This is helpful for verifying upgrades or diagnosing environment issues. ```python import bountylab print(bountylab.__version__) ``` -------------------------------- ### Enable Logging Source: https://docs.bountylab.io/api/python Enable logging by setting the BOUNTYLAB_LOG environment variable to 'info' or 'debug'. ```bash $ export BOUNTYLAB_LOG=info ``` -------------------------------- ### Find Repos by Technology Stack (README/Description) Source: https://docs.bountylab.io/guides/searching Searches for repositories based on technologies mentioned in their README or description. Useful for finding projects using specific libraries or frameworks. ```javascript // Find React component libraries (checks README, not just name) const response = await client.searchRepos.search({ query: "ui component library", filters: { op: "And", filters: [ { field: "readmePreview", op: "ContainsAllTokens", value: "react typescript", }, { field: "stargazerCount", op: "Gte", value: 500 }, ], }, }); ``` ```javascript // Find Kubernetes-native apps with quality threshold const response2 = await client.searchRepos.search({ query: "cloud native application", filters: { op: "And", filters: [ { field: "description", op: "ContainsAllTokens", value: "kubernetes helm", }, { field: "stargazerCount", op: "Gte", value: 100 }, { field: "language", op: "In", value: ["Go", "Rust"] }, ], }, }); ``` -------------------------------- ### Fetch GitHub Data in Python Source: https://docs.bountylab.io/guides/graphql-proxy Demonstrates how to use the fetch_graphql function in Python to query the Bounty Lab API. The Bounty Lab API key should be set in the BOUNTYLAB_API_KEY environment variable. ```python import requests import os def fetch_graphql(query, variables=None): """Fetch data via Bounty Lab's GraphQL proxy.""" response = requests.post( 'https://api.bountylab.io/api/github/graphql', json={'query': query, 'variables': variables or {}}, headers={ 'Authorization': f'Bearer {os.environ["BOUNTYLAB_API_KEY"]}', 'Content-Type': 'application/json' } ) data = response.json() if 'errors' in data: raise Exception(f"GraphQL Error: {data['errors']}") return data['data'] # Usage query = """ query($login: String!) { user(login: $login) { login name bio followers { totalCount } } } """ result = fetch_graphql(query, {'login': 'torvalds'}) print(result) ``` -------------------------------- ### Create Bounty Lab Client Source: https://docs.bountylab.io/guides/quickstart Initialize the Bounty Lab client with your API key. Store your API key securely, for example, using environment variables. ```typescript import Bountylab from "@bountylab/bountylab"; const client = new Bountylab({ apiKey: process.env.BOUNTYLAB_API_KEY, }); ``` -------------------------------- ### API Response Example for Best Email by GitHub Username Source: https://docs.bountylab.io/api/python/resources/user_emails/methods/best_email_by_login This is an example of a successful response (200 OK) from the API when fetching the best email addresses for GitHub users. It includes the count of results and details for each user. ```json { "count": 2, "results": [ { "bestEmail": "octocat@gmail.com", "githubId": "MDQ6VXNlcjU4MzIzMQ==", "login": "octocat", "otherCandidates": [ "string" ], "profile": "WORK" } ] } ```