Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding sekindo ads #11935

Merged
merged 9 commits into from Mar 19, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions 3p/integration.js
Expand Up @@ -170,6 +170,7 @@ import {revcontent} from '../ads/revcontent';
import {relap} from '../ads/relap';
import {revjet} from '../ads/revjet';
import {rubicon} from '../ads/rubicon';
import {sekindo} from '../ads/sekindo';
import {sharethrough} from '../ads/sharethrough';
import {sklik} from '../ads/sklik';
import {slimcutmedia} from '../ads/slimcutmedia';
Expand Down Expand Up @@ -344,6 +345,7 @@ register('relap', relap);
register('revcontent', revcontent);
register('revjet', revjet);
register('rubicon', rubicon);
register('sekindo', sekindo);
register('sharethrough', sharethrough);
register('sklik', sklik);
register('slimcutmedia', slimcutmedia);
Expand Down
3 changes: 3 additions & 0 deletions ads/_config.js
Expand Up @@ -623,6 +623,9 @@ export const adConfig = {

rubicon: {},

sekindo: {
renderStartImplemented: true,
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: new line

sharethrough: {
renderStartImplemented: true,
},
Expand Down
45 changes: 45 additions & 0 deletions ads/sekindo.js
@@ -0,0 +1,45 @@
/**
* Copyright 2017 The AMP HTML Authors. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: 2018

*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import {validateData, loadScript} from '../3p/3p';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please sort in alphabetical order to fix lint check


/**
* @param {!Window} global
* @param {!Object} data
*/
export function sekindo(global, data) {
validateData(data, ['spaceid']);
const pubUrl = encodeURIComponent(global.context.sourceUrl);
const excluedsSet = {ampSlotIndex: 1, type: 1};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: typo?

const customParamMap = {spaceid: 's',width: 'x',height: 'y'};
let query = 'isAmpProject=1&pubUrl=' + pubUrl + '&cbuster=' +
global.context.startTime + '&';
let getParam = '';
for (const key in data) {
if (data.hasOwnProperty(key)) {
if (typeof excluedsSet[key] == 'undefined') {
getParam = (typeof customParamMap[key] == 'undefined') ?
key : customParamMap[key];
query += getParam + '=' + encodeURIComponent(data[key]) + '&';
}
}
}
loadScript(global, 'https://live.sekindo.com/live/liveView.php?' + query, () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: 80 chars limit

global.context.renderStart();
}, () => {
global.context.noContentAvailable();
});
}
33 changes: 33 additions & 0 deletions ads/sekindo.md
@@ -0,0 +1,33 @@
<!---
Copyright 2017 The AMP HTML Authors. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: 2018


Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

# Sekindo

Please visit our web (http://www.sekindo.com) for more details
## Example

```html
<amp-ad width="300" height="250"
type="sekindo"
data-spaceId="14071">
</amp-ad>
```

## Configuration

__Required:__

- `data-spaceId` - Adunit unique id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI:
data-spaceId will be converted to data['spaceid']
data-space-id will be converted to data['spaceId']

6 changes: 6 additions & 0 deletions examples/ads.amp.html
Expand Up @@ -1194,6 +1194,12 @@ <h2>Rubicon Project Smart Tag</h2>
json='{"visitor":{"age":"18-24","gender":"male"},"inventory":{"section":"amp"}}'>
</amp-ad>

<h2>Sekindo</h2>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add your example to this form as well.
Also please sort them in alphabetic order. This goes after rubicon

<amp-ad width="300" height="250"
type="sekindo"
data-spaceId="14071">
</amp-ad>

<h2>Rubicon Project FastLane Single Slot</h2>
<amp-ad width="320" height="50"
type="rubicon"
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-ad/amp-ad.md
Expand Up @@ -287,6 +287,7 @@ See [amp-ad rules](https://github.com/ampproject/amphtml/blob/master/extensions/
- [Revcontent](../../ads/revcontent.md)
- [RevJet](../../ads/revjet.md)
- [Rubicon Project](../../ads/rubicon.md)
- [Sekindo](../../ads/sekindo.md)
- [Sharethrough](../../ads/sharethrough.md)
- [Sklik](../../ads/sklik.md)
- [SlimCut Media](../../ads/slimcutmedia.md)
Expand Down