Skip to content

Commit

Permalink
Refactor new documentation links (#69)
Browse files Browse the repository at this point in the history
Signed-off-by: Aryan Bhokare <[email protected]>
  • Loading branch information
aryan-bhokare authored Aug 17, 2024
1 parent c946177 commit a75415a
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ Licensed under the GNU AFFERO GENERAL PUBLIC LICENSE.

# Links
- [Intelowl](https://github.com/intelowlproject/IntelOwl)
- [Documentation](https://intelowl.readthedocs.io/en/latest/)
- [API documentation](https://intelowl.readthedocs.io/en/latest/Redoc.html)
- [Documentation](https://intelowlproject.github.io/docs/)
- [API documentation](https://intelowlproject.github.io/docs/IntelOwl/api_docs/)
- [Examples](./examples/)

# FAQ
Expand Down
8 changes: 4 additions & 4 deletions gointelowl/analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type MultipleAnalysisResponse struct {
//
// Endpoint: POST /api/analyze_observable
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/analyze_observable
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/analyze_observable
func (client *IntelOwlClient) CreateObservableAnalysis(ctx context.Context, params *ObservableAnalysisParams) (*AnalysisResponse, error) {
requestUrl := client.options.Url + constants.ANALYZE_OBSERVABLE_URL
method := "POST"
Expand Down Expand Up @@ -95,7 +95,7 @@ func (client *IntelOwlClient) CreateObservableAnalysis(ctx context.Context, para
//
// Endpoint: POST /api/analyze_multiple_observables
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/analyze_multiple_observables
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/analyze_multiple_observables
func (client *IntelOwlClient) CreateMultipleObservableAnalysis(ctx context.Context, params *MultipleObservableAnalysisParams) (*MultipleAnalysisResponse, error) {
requestUrl := client.options.Url + constants.ANALYZE_MULTIPLE_OBSERVABLES_URL
method := "POST"
Expand Down Expand Up @@ -123,7 +123,7 @@ func (client *IntelOwlClient) CreateMultipleObservableAnalysis(ctx context.Conte
//
// Endpoint: POST /api/analyze_file
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/analyze_file
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/analyze_file
func (client *IntelOwlClient) CreateFileAnalysis(ctx context.Context, fileAnalysisParams *FileAnalysisParams) (*AnalysisResponse, error) {
requestUrl := client.options.Url + constants.ANALYZE_FILE_URL
// * Making the multiform data
Expand Down Expand Up @@ -201,7 +201,7 @@ func (client *IntelOwlClient) CreateFileAnalysis(ctx context.Context, fileAnalys
//
// Endpoint: POST /api/analyze_mutliple_files
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/analyze_multiple_files
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/analyze_multiple_files
func (client *IntelOwlClient) CreateMultipleFileAnalysis(ctx context.Context, fileAnalysisParams *MultipleFileAnalysisParams) (*MultipleAnalysisResponse, error) {
requestUrl := client.options.Url + constants.ANALYZE_MULTIPLE_FILES_URL
// * Making the multiform data
Expand Down
6 changes: 3 additions & 3 deletions gointelowl/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type AnalyzerConfig struct {

// AnalyzerService handles communication with analyzer related methods of the IntelOwl API.
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/analyzer
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/analyzer
type AnalyzerService struct {
client *IntelOwlClient
}
Expand All @@ -36,7 +36,7 @@ type AnalyzerService struct {
//
// Endpoint: GET /api/get_analyzer_configs
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/get_analyzer_configs
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/get_analyzer_configs
func (analyzerService *AnalyzerService) GetConfigs(ctx context.Context) (*[]AnalyzerConfig, error) {
requestUrl := analyzerService.client.options.Url + constants.ANALYZER_CONFIG_URL
contentType := "application/json"
Expand Down Expand Up @@ -74,7 +74,7 @@ func (analyzerService *AnalyzerService) GetConfigs(ctx context.Context) (*[]Anal
//
// Endpoint: GET /api/analyzer/{NameOfAnalyzer}/healthcheck
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/analyzer/operation/analyzer_healthcheck_retrieve
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/analyzer/operation/analyzer_healthcheck_retrieve
func (analyzerService *AnalyzerService) HealthCheck(ctx context.Context, analyzerName string) (bool, error) {
route := analyzerService.client.options.Url + constants.ANALYZER_HEALTHCHECK_URL
requestUrl := fmt.Sprintf(route, analyzerName)
Expand Down
6 changes: 3 additions & 3 deletions gointelowl/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type ConnectorConfig struct {

// ConnectorService handles communication with connector related methods of the IntelOwl API.
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/connector
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/connector
type ConnectorService struct {
client *IntelOwlClient
}
Expand All @@ -28,7 +28,7 @@ type ConnectorService struct {
//
// Endpoint: GET /api/get_connector_configs
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/get_connector_configs
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/get_connector_configs
func (connectorService *ConnectorService) GetConfigs(ctx context.Context) (*[]ConnectorConfig, error) {
requestUrl := connectorService.client.options.Url + constants.CONNECTOR_CONFIG_URL
contentType := "application/json"
Expand Down Expand Up @@ -66,7 +66,7 @@ func (connectorService *ConnectorService) GetConfigs(ctx context.Context) (*[]Co
//
// Endpoint: GET /api/connector/{NameOfConnector}/healthcheck
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/connector/operation/connector_healthcheck_retrieve
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/connector/operation/connector_healthcheck_retrieve
func (connectorService *ConnectorService) HealthCheck(ctx context.Context, connectorName string) (bool, error) {
route := connectorService.client.options.Url + constants.CONNECTOR_HEALTHCHECK_URL
requestUrl := fmt.Sprintf(route, connectorName)
Expand Down
20 changes: 10 additions & 10 deletions gointelowl/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type JobListResponse struct {

// JobService handles communication with job related methods of IntelOwl API.
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs
type JobService struct {
client *IntelOwlClient
}
Expand All @@ -81,7 +81,7 @@ type JobService struct {
//
// Endpoint: GET /api/jobs
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_list
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_list
func (jobService *JobService) List(ctx context.Context) (*JobListResponse, error) {
requestUrl := jobService.client.options.Url + constants.BASE_JOB_URL
contentType := "application/json"
Expand All @@ -107,7 +107,7 @@ func (jobService *JobService) List(ctx context.Context) (*JobListResponse, error
//
// Endpoint: GET /api/jobs/{jobID}
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_retrieve
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_retrieve
func (jobService *JobService) Get(ctx context.Context, jobId uint64) (*Job, error) {
route := jobService.client.options.Url + constants.SPECIFIC_JOB_URL
requestUrl := fmt.Sprintf(route, jobId)
Expand All @@ -133,7 +133,7 @@ func (jobService *JobService) Get(ctx context.Context, jobId uint64) (*Job, erro
//
// Endpoint: GET /api/jobs/{jobID}/download_sample
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_download_sample_retrieve
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_download_sample_retrieve
func (jobService *JobService) DownloadSample(ctx context.Context, jobId uint64) ([]byte, error) {
route := jobService.client.options.Url + constants.DOWNLOAD_SAMPLE_JOB_URL
requestUrl := fmt.Sprintf(route, jobId)
Expand All @@ -154,7 +154,7 @@ func (jobService *JobService) DownloadSample(ctx context.Context, jobId uint64)
//
// Endpoint: DELETE /api/jobs/{jobID}
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_destroy
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_destroy
func (jobService *JobService) Delete(ctx context.Context, jobId uint64) (bool, error) {
route := jobService.client.options.Url + constants.SPECIFIC_JOB_URL
requestUrl := fmt.Sprintf(route, jobId)
Expand All @@ -178,7 +178,7 @@ func (jobService *JobService) Delete(ctx context.Context, jobId uint64) (bool, e
//
// Endpoint: PATCH /api/jobs/{jobID}/kill
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_kill_partial_update
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_kill_partial_update
func (jobService *JobService) Kill(ctx context.Context, jobId uint64) (bool, error) {
route := jobService.client.options.Url + constants.KILL_JOB_URL
requestUrl := fmt.Sprintf(route, jobId)
Expand All @@ -202,7 +202,7 @@ func (jobService *JobService) Kill(ctx context.Context, jobId uint64) (bool, err
//
// Endpoint: PATCH /api/jobs/{jobID}/analyzer/{nameOfAnalyzer}/kill
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_analyzer_kill_partial_update
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_analyzer_kill_partial_update
func (jobService *JobService) KillAnalyzer(ctx context.Context, jobId uint64, analyzerName string) (bool, error) {
route := jobService.client.options.Url + constants.KILL_ANALYZER_JOB_URL
requestUrl := fmt.Sprintf(route, jobId, analyzerName)
Expand All @@ -226,7 +226,7 @@ func (jobService *JobService) KillAnalyzer(ctx context.Context, jobId uint64, an
//
// Endpoint: PATCH /api/jobs/{jobID}/analyzer/{nameOfAnalyzer}/retry
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_analyzer_retry_partial_update
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_analyzer_retry_partial_update
func (jobService *JobService) RetryAnalyzer(ctx context.Context, jobId uint64, analyzerName string) (bool, error) {
route := jobService.client.options.Url + constants.RETRY_ANALYZER_JOB_URL
requestUrl := fmt.Sprintf(route, jobId, analyzerName)
Expand All @@ -250,7 +250,7 @@ func (jobService *JobService) RetryAnalyzer(ctx context.Context, jobId uint64, a
//
// Endpoint: PATCH /api/jobs/{jobID}/connector/{nameOfConnector}/kill
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_connector_kill_partial_update
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_connector_kill_partial_update
func (jobService *JobService) KillConnector(ctx context.Context, jobId uint64, connectorName string) (bool, error) {
route := jobService.client.options.Url + constants.KILL_CONNECTOR_JOB_URL
requestUrl := fmt.Sprintf(route, jobId, connectorName)
Expand All @@ -274,7 +274,7 @@ func (jobService *JobService) KillConnector(ctx context.Context, jobId uint64, c
//
// Endpoint: PATCH /api/jobs/{jobID}/connector/{nameOfConnector}/retry
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/jobs/operation/jobs_connector_retry_partial_update
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/jobs/operation/jobs_connector_retry_partial_update
func (jobService *JobService) RetryConnector(ctx context.Context, jobId uint64, connectorName string) (bool, error) {
route := jobService.client.options.Url + constants.RETRY_CONNECTOR_JOB_URL
requestUrl := fmt.Sprintf(route, jobId, connectorName)
Expand Down
10 changes: 5 additions & 5 deletions gointelowl/me.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ type InvitationParams struct {
//
// Endpoint: GET /api/me/access
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/me/operation/me_access_retrieve
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/me/operation/me_access_retrieve
func (userService *UserService) Access(ctx context.Context) (*User, error) {
requestUrl := userService.client.options.Url + constants.USER_DETAILS_URL
contentType := "application/json"
Expand All @@ -98,7 +98,7 @@ func (userService *UserService) Access(ctx context.Context) (*User, error) {
//
// Endpoint: GET /api/me/organization
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/me/operation/me_organization_list
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/me/operation/me_organization_list
func (userService *UserService) Organization(ctx context.Context) (*Organization, error) {
requestUrl := userService.client.options.Url + constants.ORGANIZATION_URL
contentType := "application/json"
Expand All @@ -123,7 +123,7 @@ func (userService *UserService) Organization(ctx context.Context) (*Organization
//
// Endpoint: POST /api/me/organization
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/me/operation/me_organization_create
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/me/operation/me_organization_create
func (userService *UserService) CreateOrganization(ctx context.Context, organizationParams *OrganizationParams) (*Organization, error) {
requestUrl := userService.client.options.Url + constants.ORGANIZATION_URL
// Getting the relevant JSON data
Expand Down Expand Up @@ -155,7 +155,7 @@ func (userService *UserService) CreateOrganization(ctx context.Context, organiza
//
// Endpoint: POST /api/me/organization/invite
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/me/operation/me_organization_invite_create
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/me/operation/me_organization_invite_create
func (userService *UserService) InviteToOrganization(ctx context.Context, memberParams *MemberParams) (*Invite, error) {
requestUrl := userService.client.options.Url + constants.INVITE_TO_ORGANIZATION_URL
// Getting the relevant JSON data
Expand Down Expand Up @@ -187,7 +187,7 @@ func (userService *UserService) InviteToOrganization(ctx context.Context, member
//
// Endpoint: POST /api/me/organization/remove_member
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/me/operation/me_organization_create
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/me/operation/me_organization_create
func (userService *UserService) RemoveMemberFromOrganization(ctx context.Context, memberParams *MemberParams) (bool, error) {
requestUrl := userService.client.options.Url + constants.REMOVE_MEMBER_FROM_ORGANIZATION_URL
// Getting the relevant JSON data
Expand Down
12 changes: 6 additions & 6 deletions gointelowl/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type Tag struct {

// TagService handles communication with tag related methods of IntelOwl API.
//
// IntelOwl REST API tag docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/tags
// IntelOwl REST API tag docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/tags
type TagService struct {
client *IntelOwlClient
}
Expand All @@ -43,7 +43,7 @@ func checkTagID(id uint64) error {
//
// Endpoint: GET "/api/tags"
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/tags/operation/tags_list
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/tags/operation/tags_list
func (tagService *TagService) List(ctx context.Context) (*[]Tag, error) {
requestUrl := tagService.client.options.Url + constants.BASE_TAG_URL
contentType := "application/json"
Expand All @@ -69,7 +69,7 @@ func (tagService *TagService) List(ctx context.Context) (*[]Tag, error) {
//
// Endpoint: GET "/api/tags/{id}"
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/tags/operation/tags_retrieve
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/tags/operation/tags_retrieve
func (tagService *TagService) Get(ctx context.Context, tagId uint64) (*Tag, error) {
if err := checkTagID(tagId); err != nil {
return nil, err
Expand Down Expand Up @@ -98,7 +98,7 @@ func (tagService *TagService) Get(ctx context.Context, tagId uint64) (*Tag, erro
//
// Endpoint: POST "/api/tags/"
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/tags/operation/tags_create
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/tags/operation/tags_create
func (tagService *TagService) Create(ctx context.Context, tagParams *TagParams) (*Tag, error) {
requestUrl := tagService.client.options.Url + constants.BASE_TAG_URL
tagJson, err := json.Marshal(tagParams)
Expand Down Expand Up @@ -128,7 +128,7 @@ func (tagService *TagService) Create(ctx context.Context, tagParams *TagParams)
//
// Endpoint: PUT "/api/tags/{id}"
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/tags/operation/tags_update
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/tags/operation/tags_update
func (tagService *TagService) Update(ctx context.Context, tagId uint64, tagParams *TagParams) (*Tag, error) {
route := tagService.client.options.Url + constants.SPECIFIC_TAG_URL
requestUrl := fmt.Sprintf(route, tagId)
Expand Down Expand Up @@ -161,7 +161,7 @@ func (tagService *TagService) Update(ctx context.Context, tagId uint64, tagParam
//
// Endpoint: DELETE "/api/tags/{id}"
//
// IntelOwl REST API docs: https://intelowl.readthedocs.io/en/latest/Redoc.html#tag/tags/operation/tags_destroy
// IntelOwl REST API docs: https://intelowlproject.github.io/docs/IntelOwl/api_docs/#tag/tags/operation/tags_destroy
func (tagService *TagService) Delete(ctx context.Context, tagId uint64) (bool, error) {
if err := checkTagID(tagId); err != nil {
return false, err
Expand Down

0 comments on commit a75415a

Please sign in to comment.