Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
1
1weather
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
1weather
Commits
84d5202c
Commit
84d5202c
authored
Jun 07, 2021
by
Dmitriy Stepanets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added initial model
parent
2719e434
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
222 additions
and
3 deletions
+222
-3
1Weather.xcodeproj/xcuserdata/dstepanets.xcuserdatad/xcschemes/xcschememanagement.plist
+1
-1
1Weather.xcworkspace/contents.xcworkspacedata
+3
-0
1Weather.xcworkspace/xcuserdata/dstepanets.xcuserdatad/xcschemes/xcschememanagement.plist
+2
-2
InMobiShortsSource/InMobiShortsSource.xcodeproj/project.pbxproj
+0
-0
InMobiShortsSource/InMobiShortsSource/InMobiShortSource.swift
+18
-0
InMobiShortsSource/InMobiShortsSource/InMobiShortsSource.h
+18
-0
InMobiShortsSource/InMobiShortsSource/Info.plist
+22
-0
InMobiShortsSource/InMobiShortsSource/Models/Glance.swift
+20
-0
InMobiShortsSource/InMobiShortsSource/Models/GlanceDetails.swift
+25
-0
InMobiShortsSource/InMobiShortsSource/Models/GlanceImage.swift
+19
-0
InMobiShortsSource/InMobiShortsSource/Models/Peek.swift
+23
-0
InMobiShortsSource/InMobiShortsSource/Models/PeekData.swift
+16
-0
InMobiShortsSource/InMobiShortsSourceTests/InMobiShortsSourceTests.swift
+33
-0
InMobiShortsSource/InMobiShortsSourceTests/Info.plist
+22
-0
No files found.
1Weather.xcodeproj/xcuserdata/dstepanets.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
84d5202c
...
...
@@ -12,7 +12,7 @@
<
k
e
y
>
OneWeatherNotificationServiceExtension.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
5
7
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
5
5
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
k
e
y
>
PG
(
Playground
)
1.xcscheme
<
/k
e
y
>
<
d
i
c
t
>
...
...
1Weather.xcworkspace/contents.xcworkspacedata
View file @
84d5202c
...
...
@@ -2,6 +2,9 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"group:InMobiShortsSource/InMobiShortsSource.xcodeproj"
>
</FileRef>
<FileRef
location =
"group:OneWeatherAnalytics/OneWeatherAnalytics.xcodeproj"
>
</FileRef>
<FileRef
...
...
1Weather.xcworkspace/xcuserdata/dstepanets.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
84d5202c
...
...
@@ -135,7 +135,7 @@
<
k
e
y
>
isShown
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
2
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
60
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
k
e
y
>
PG
(
Playground
)
1.xcscheme
<
/k
e
y
>
<
d
i
c
t
>
...
...
@@ -268,7 +268,7 @@
<
k
e
y
>
isShown
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
1
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
6
1
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
...
...
InMobiShortsSource/InMobiShortsSource.xcodeproj/project.pbxproj
0 → 100644
View file @
84d5202c
This diff is collapsed.
Click to expand it.
InMobiShortsSource/InMobiShortsSource/InMobiShortSource.swift
0 → 100644
View file @
84d5202c
//
// InMobiShortSource.swift
// InMobiShortsSource
//
// Created by Dmitry Stepanets on 07.06.2021.
//
import
Foundation
public
class
InMobiShortSource
{
private
static
let
apiKey
=
"9b5f4682b74f75cbedb34ee235c988f9"
private
static
let
region
=
"US"
private
static
let
sdkV
=
"80000"
public
func
getShorts
(
completion
:
@escaping
(
_
shorts
:[
GlanceDetails
])
->
Void
)
{
}
}
InMobiShortsSource/InMobiShortsSource/InMobiShortsSource.h
0 → 100644
View file @
84d5202c
//
// InMobiShortsSource.h
// InMobiShortsSource
//
// Created by Dmitry Stepanets on 07.06.2021.
//
#import <Foundation/Foundation.h>
//! Project version number for InMobiShortsSource.
FOUNDATION_EXPORT
double
InMobiShortsSourceVersionNumber
;
//! Project version string for InMobiShortsSource.
FOUNDATION_EXPORT
const
unsigned
char
InMobiShortsSourceVersionString
[];
// In this header, you should import all the public headers of your framework using statements like #import <InMobiShortsSource/PublicHeader.h>
InMobiShortsSource/InMobiShortsSource/Info.plist
0 → 100644
View file @
84d5202c
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
$
(
DEVELOPMENT_LANGUAGE
)<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
$
(
EXECUTABLE_NAME
)<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
$
(
PRODUCT_BUNDLE_IDENTIFIER
)<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
$
(
PRODUCT_NAME
)<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
$
(
PRODUCT_BUNDLE_PACKAGE_TYPE
)<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
$
(
CURRENT_PROJECT_VERSION
)<
/string
>
<
/
d
i
c
t
>
<
/plist
>
InMobiShortsSource/InMobiShortsSource/Models/Glance.swift
0 → 100644
View file @
84d5202c
//
// Glance.swift
// InMobiShortsSource
//
// Created by Dmitry Stepanets on 07.06.2021.
//
import
Foundation
enum
GlanceUpdateType
:
String
,
Codable
{
case
ADD
=
"ADD"
case
REMOVE
=
"REMOVE"
}
struct
Glance
:
Codable
{
let
glanceId
:
String
let
updatedAtInSecs
:
TimeInterval
let
glanceType
:
String
let
updateType
:
GlanceUpdateType
}
InMobiShortsSource/InMobiShortsSource/Models/GlanceDetails.swift
0 → 100644
View file @
84d5202c
//
// GlanceDetails.swift
// InMobiShortsSource
//
// Created by Dmitry Stepanets on 07.06.2021.
//
import
Foundation
public
struct
GlanceIteractionDetails
:
Codable
{
let
likeCount
:
Int
let
shareCount
:
Int
}
public
struct
GlanceDetails
:
Codable
{
public
let
id
:
String
public
let
image
:
GlanceImage
public
let
updatedAtInSecs
:
TimeInterval
public
let
startsAtInSecs
:
TimeInterval
public
let
endsAtInSecs
:
TimeInterval
public
let
shareURL
:
URL
?
public
let
peekData
:
PeekData
public
let
peek
:
Peek
public
let
glanceIteractionDetails
:
GlanceIteractionDetails
}
InMobiShortsSource/InMobiShortsSource/Models/GlanceImage.swift
0 → 100644
View file @
84d5202c
//
// GlanceImage.swift
// InMobiShortsSource
//
// Created by Dmitry Stepanets on 07.06.2021.
//
import
Foundation
public
struct
GlanceImageFormat
:
Codable
{
let
width
:
Int
let
height
:
Int
let
url
:
URL
}
public
struct
GlanceImage
:
Codable
{
let
id
:
String
let
supportedImages
:[
GlanceImageFormat
]
}
InMobiShortsSource/InMobiShortsSource/Models/Peek.swift
0 → 100644
View file @
84d5202c
//
// Peek.swift
// InMobiShortsSource
//
// Created by Dmitry Stepanets on 07.06.2021.
//
import
Foundation
public
struct
Peek
:
Codable
{
let
articlePeek
:
ArticlePeek
}
struct
ArticlePeek
:
Codable
{
let
summary
:
String
let
cta
:
GlanceCTA
}
struct
GlanceCTA
:
Codable
{
let
url
:
URL
let
text
:
String
}
InMobiShortsSource/InMobiShortsSource/Models/PeekData.swift
0 → 100644
View file @
84d5202c
//
// PeekData.swift
// InMobiShortsSource
//
// Created by Dmitry Stepanets on 07.06.2021.
//
import
Foundation
public
struct
PeekData
:
Codable
{
public
let
title
:
String
public
let
sourceName
:
String
public
let
heartCount
:
Int
public
let
shortURL
:
URL
?
public
let
ctaText
:
String
}
InMobiShortsSource/InMobiShortsSourceTests/InMobiShortsSourceTests.swift
0 → 100644
View file @
84d5202c
//
// InMobiShortsSourceTests.swift
// InMobiShortsSourceTests
//
// Created by Dmitry Stepanets on 07.06.2021.
//
import
XCTest
@testable
import
InMobiShortsSource
class
InMobiShortsSourceTests
:
XCTestCase
{
override
func
setUpWithError
()
throws
{
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override
func
tearDownWithError
()
throws
{
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
func
testExample
()
throws
{
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
func
testPerformanceExample
()
throws
{
// This is an example of a performance test case.
self
.
measure
{
// Put the code you want to measure the time of here.
}
}
}
InMobiShortsSource/InMobiShortsSourceTests/Info.plist
0 → 100644
View file @
84d5202c
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
$
(
DEVELOPMENT_LANGUAGE
)<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
$
(
EXECUTABLE_NAME
)<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
$
(
PRODUCT_BUNDLE_IDENTIFIER
)<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
$
(
PRODUCT_NAME
)<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
$
(
PRODUCT_BUNDLE_PACKAGE_TYPE
)<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1
<
/string
>
<
/
d
i
c
t
>
<
/plist
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment