epiphany/majestic-seo-bundle

Symfony Bundle

0.1.4 2018-01-09 16:46 UTC

This package is auto-updated.

Last update: 2024-09-29 04:48:54 UTC


README

Majestic SEO Symfony Bundle

版本历史

v0.1.5 - 2018年1月10日

 - Update

 - Update composer

 - Add scrutinizer config

 - Refactoring & Tests

 - Change

 - Merge branch 'master' of https://bitbucket.org/epiphanyinternaltools/majestic-seo-api-bundle

 - Fixes

 - Fixes

 - Amends

 - Update authors

 - Initial commit

=====================

Symfony Bundle 用于向 Majestic SEO API 发送请求

此包也通过 composer 提供,在 packagist 上查找。

安装

epiphany/majestic-seo-bundle 包添加到您的 composer.json 文件的 require 部分。

$ composer require epiphany/majestic-seo-bundle

将 EpiphanyMajesticSeoBundle 添加到您的应用程序的内核中

<?php
public function registerBundles()
{
    $bundles = array(
        // ...
        new Epiphany\MajesticSeoBundle\EpiphanyMajesticSeoBundle(),
        // ...
    );
    ...
}

配置

config.yml

epiphany_majestic_seo:
    endpoint: 'https://developer.majestic.com/api'
    apiKey: 'AH00000I11355882'
    # optional, you can specify the guzzle client that will be used for the requests
    # guzzle: '@eight_points_guzzle.client.default' 

services.yml

app.data_fetcher.data_fetcher:
    class: AppBundle\DataFetcher\DataFetcher
    arguments: ['@epiphany_majestic_seo']
    

用法

$params = [
    'MaxSameSourceURLs' => 1
];
        
$response = $this->majesticApiService->getBackLinkData('test.com', $params);

$params = [
    'Count' => 1000
];

$response = $this->majesticApiService->getAnchorText('test.com', $params);
$params = [
    'Count' => 10000,
    'Mode' => 1,
    'datasource' => 'fresh',
    'MaxSourceURLsPerRefDomain' => 1
];
$response = $this->majesticApiService->getBackLinkData('test.com', $params);

Majestic Seo Api 命令

要查看所有可用 API 命令的完整列表,请参阅官方文档 https://developer-support.majestic.com/api/commands/