All URIs are relative to https://api.unifapi.com
| Method | HTTP request | Description |
|---|---|---|
| HackerNewsItemsIdGet | GET /hacker-news/items/{id} | Get Hacker News item by ID |
| HackerNewsMaxItemGet | GET /hacker-news/max-item | Get largest Hacker News item ID |
| HackerNewsStoriesFeedGet | GET /hacker-news/stories/{feed} | List Hacker News story IDs |
| HackerNewsStoriesFeedItemsGet | GET /hacker-news/stories/{feed}/items | List Hacker News story items |
| HackerNewsUpdatesGet | GET /hacker-news/updates | Get changed Hacker News items and profiles |
| HackerNewsUsersIdGet | GET /hacker-news/users/{id} | Get Hacker News user by ID |
HackerNewsItemsIdGet200Response HackerNewsItemsIdGet (int id)
Get Hacker News item by ID
Fetch a single Hacker News item. Stories, comments, jobs, polls, and poll options share the same item shape.
using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;
namespace Example
{
public class HackerNewsItemsIdGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.unifapi.com";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new HackerNewsApi(config);
var id = 56; // int | Hacker News item id.
try
{
// Get Hacker News item by ID
HackerNewsItemsIdGet200Response result = apiInstance.HackerNewsItemsIdGet(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HackerNewsApi.HackerNewsItemsIdGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get Hacker News item by ID
ApiResponse<HackerNewsItemsIdGet200Response> response = apiInstance.HackerNewsItemsIdGetWithHttpInfo(id);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HackerNewsApi.HackerNewsItemsIdGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Hacker News item id. |
HackerNewsItemsIdGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HackerNewsMaxItemGet200Response HackerNewsMaxItemGet ()
Get largest Hacker News item ID
Returns the current largest Hacker News item id.
using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;
namespace Example
{
public class HackerNewsMaxItemGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.unifapi.com";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new HackerNewsApi(config);
try
{
// Get largest Hacker News item ID
HackerNewsMaxItemGet200Response result = apiInstance.HackerNewsMaxItemGet();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HackerNewsApi.HackerNewsMaxItemGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get largest Hacker News item ID
ApiResponse<HackerNewsMaxItemGet200Response> response = apiInstance.HackerNewsMaxItemGetWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HackerNewsApi.HackerNewsMaxItemGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}This endpoint does not need any parameter.
HackerNewsMaxItemGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HackerNewsStoriesFeedGet200Response HackerNewsStoriesFeedGet (HackerNewsStoryFeed feed, string? cursor = null, int? limit = null)
List Hacker News story IDs
List Hacker News story ids from a named feed. Use /hacker-news/items/{id} to fetch item details.
using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;
namespace Example
{
public class HackerNewsStoriesFeedGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.unifapi.com";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new HackerNewsApi(config);
var feed = (HackerNewsStoryFeed) "top"; // HackerNewsStoryFeed | Story feed: top, new, best, ask, show, or jobs.
var cursor = "cursor_example"; // string? | Zero-based offset cursor returned as `next_cursor`. (optional)
var limit = 100; // int? | (optional) (default to 100)
try
{
// List Hacker News story IDs
HackerNewsStoriesFeedGet200Response result = apiInstance.HackerNewsStoriesFeedGet(feed, cursor, limit);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HackerNewsApi.HackerNewsStoriesFeedGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// List Hacker News story IDs
ApiResponse<HackerNewsStoriesFeedGet200Response> response = apiInstance.HackerNewsStoriesFeedGetWithHttpInfo(feed, cursor, limit);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HackerNewsApi.HackerNewsStoriesFeedGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}| Name | Type | Description | Notes |
|---|---|---|---|
| feed | HackerNewsStoryFeed | Story feed: top, new, best, ask, show, or jobs. | |
| cursor | string? | Zero-based offset cursor returned as `next_cursor`. | [optional] |
| limit | int? | [optional] [default to 100] |
HackerNewsStoriesFeedGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HackerNewsStoriesFeedItemsGet200Response HackerNewsStoriesFeedItemsGet (HackerNewsStoryFeed feed, string? cursor = null, int? limit = null)
List Hacker News story items
Fetch item details from a named Hacker News story feed in one operation. Use this when an agent needs readable story titles, URLs, scores, authors, or comment counts.
using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;
namespace Example
{
public class HackerNewsStoriesFeedItemsGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.unifapi.com";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new HackerNewsApi(config);
var feed = (HackerNewsStoryFeed) "top"; // HackerNewsStoryFeed | Story feed: top, new, best, ask, show, or jobs.
var cursor = "cursor_example"; // string? | Zero-based offset cursor returned as `next_cursor`. (optional)
var limit = 20; // int? | (optional) (default to 20)
try
{
// List Hacker News story items
HackerNewsStoriesFeedItemsGet200Response result = apiInstance.HackerNewsStoriesFeedItemsGet(feed, cursor, limit);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HackerNewsApi.HackerNewsStoriesFeedItemsGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// List Hacker News story items
ApiResponse<HackerNewsStoriesFeedItemsGet200Response> response = apiInstance.HackerNewsStoriesFeedItemsGetWithHttpInfo(feed, cursor, limit);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HackerNewsApi.HackerNewsStoriesFeedItemsGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}| Name | Type | Description | Notes |
|---|---|---|---|
| feed | HackerNewsStoryFeed | Story feed: top, new, best, ask, show, or jobs. | |
| cursor | string? | Zero-based offset cursor returned as `next_cursor`. | [optional] |
| limit | int? | [optional] [default to 20] |
HackerNewsStoriesFeedItemsGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HackerNewsUpdatesGet200Response HackerNewsUpdatesGet ()
Get changed Hacker News items and profiles
Returns recently changed Hacker News item ids and user profile ids.
using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;
namespace Example
{
public class HackerNewsUpdatesGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.unifapi.com";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new HackerNewsApi(config);
try
{
// Get changed Hacker News items and profiles
HackerNewsUpdatesGet200Response result = apiInstance.HackerNewsUpdatesGet();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HackerNewsApi.HackerNewsUpdatesGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get changed Hacker News items and profiles
ApiResponse<HackerNewsUpdatesGet200Response> response = apiInstance.HackerNewsUpdatesGetWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HackerNewsApi.HackerNewsUpdatesGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}This endpoint does not need any parameter.
HackerNewsUpdatesGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HackerNewsUsersIdGet200Response HackerNewsUsersIdGet (string id)
Get Hacker News user by ID
Fetch a public Hacker News user profile by case-sensitive username.
using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;
namespace Example
{
public class HackerNewsUsersIdGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.unifapi.com";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new HackerNewsApi(config);
var id = "id_example"; // string | Case-sensitive Hacker News username.
try
{
// Get Hacker News user by ID
HackerNewsUsersIdGet200Response result = apiInstance.HackerNewsUsersIdGet(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HackerNewsApi.HackerNewsUsersIdGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get Hacker News user by ID
ApiResponse<HackerNewsUsersIdGet200Response> response = apiInstance.HackerNewsUsersIdGetWithHttpInfo(id);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HackerNewsApi.HackerNewsUsersIdGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | Case-sensitive Hacker News username. |
HackerNewsUsersIdGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]